diff mbox series

[2/2] scsi: return BLK_STS_TRANSPORT for ALUA transitioning

Message ID 20220524055631.85480-3-hare@suse.de (mailing list archive)
State New, archived
Headers show
Series block,scsi: BLK_STS_AGAIN clarification | expand

Commit Message

Hannes Reinecke May 24, 2022, 5:56 a.m. UTC
When the 'ALUA state transitioning' sense code is returned we
cannot use BLK_STS_AGAIN, as this has a very specific use-case.
So return BLK_STS_TRANSPORT here.

Signed-off-by: Hannes Reinecke <hare@suse.de>
---
 drivers/scsi/scsi_lib.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

Comments

Chaitanya Kulkarni May 24, 2022, 3:15 p.m. UTC | #1
On 5/23/22 22:56, Hannes Reinecke wrote:
> When the 'ALUA state transitioning' sense code is returned we
> cannot use BLK_STS_AGAIN, as this has a very specific use-case.
> So return BLK_STS_TRANSPORT here.
> 
> Signed-off-by: Hannes Reinecke <hare@suse.de>
> ---

Do we need a fixes tag ? irrespective of that looks good.

Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>

-ck
Martin K. Petersen June 2, 2022, 2:39 a.m. UTC | #2
Hannes,

> When the 'ALUA state transitioning' sense code is returned we cannot
> use BLK_STS_AGAIN, as this has a very specific use-case.  So return
> BLK_STS_TRANSPORT here.

Applied to 5.19/scsi-staging, thanks!
diff mbox series

Patch

diff --git a/drivers/scsi/scsi_lib.c b/drivers/scsi/scsi_lib.c
index 8d18cc7e510e..a55deb5caa34 100644
--- a/drivers/scsi/scsi_lib.c
+++ b/drivers/scsi/scsi_lib.c
@@ -779,7 +779,7 @@  static void scsi_io_completion_action(struct scsi_cmnd *cmd, int result)
 					action = ACTION_DELAYED_RETRY;
 					break;
 				case 0x0a: /* ALUA state transition */
-					blk_stat = BLK_STS_AGAIN;
+					blk_stat = BLK_STS_TRANSPORT;
 					fallthrough;
 				default:
 					action = ACTION_FAIL;