Commit 0d882320 authored by Hannes Reinecke's avatar Hannes Reinecke Committed by Martin K. Petersen

scsi: core: Return BLK_STS_AGAIN for ALUA transitioning

Whenever we encounter a sense code of ALUA transitioning in
scsi_io_completion() it means that the SCSI midlayer ran out of retries
trying to wait for ALUA transitioning.  In these cases we should be passing
up the error, but signalling that the I/O might be retried, preferably on
another path.  So return BLK_STS_AGAIN in these cases.

[mkp: typo + fallthrough]

Link: https://lore.kernel.org/r/20200930080256.90964-5-hare@suse.deReviewed-by: default avatarEwan D. Milne <emilne@redhat.com>
Signed-off-by: default avatarHannes Reinecke <hare@suse.de>
Signed-off-by: default avatarMartin K. Petersen <martin.petersen@oracle.com>
parent fb908850
...@@ -766,6 +766,9 @@ static void scsi_io_completion_action(struct scsi_cmnd *cmd, int result) ...@@ -766,6 +766,9 @@ static void scsi_io_completion_action(struct scsi_cmnd *cmd, int result)
case 0x24: /* depopulation in progress */ case 0x24: /* depopulation in progress */
action = ACTION_DELAYED_RETRY; action = ACTION_DELAYED_RETRY;
break; break;
case 0x0a: /* ALUA state transition */
blk_stat = BLK_STS_AGAIN;
fallthrough;
default: default:
action = ACTION_FAIL; action = ACTION_FAIL;
break; break;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment