On Fujitsu ETERNUS systems, sense code ABORTED COMMAND with ASC/Q C1/01
is used to indicate temporary condition where the storage-internal path
to a target is switched from one controller to another. SCSI commands
that return with this error code must be retried unconditionally (i.e. without
the "maybe_retry" logic in scsi_decide_disposition); otherwise dm-multipath
might initiate a failover from a healthy path e.g. for REQ_FAILFAST_DEV
commands.

Signed-off-by: Martin Wilck <mwi...@suse.com>
---
 drivers/scsi/scsi_error.c | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/drivers/scsi/scsi_error.c b/drivers/scsi/scsi_error.c
index d042915ce895..598111a741d4 100644
--- a/drivers/scsi/scsi_error.c
+++ b/drivers/scsi/scsi_error.c
@@ -518,6 +518,16 @@ int scsi_check_sense(struct scsi_cmnd *scmd)
                if (sshdr.asc == 0x10) /* DIF */
                        return SUCCESS;
 
+               if (!strncmp(scmd->device->vendor, "FUJITSU", 7) &&
+                          !strncmp(scmd->device->model, "ETERNUS_DXM", 11) &&
+                          (sshdr.asc == 0xc1) && (sshdr.ascq == 0x1)) {
+                       /*
+                        * Fujitsu Eternus uses this vendor specific code
+                        * to indicate an internal reconfiguration status
+                        * which can be recovered with a retry.
+                        */
+                       return ADD_TO_MLQUEUE;
+               }
                return NEEDS_RETRY;
        case NOT_READY:
        case UNIT_ATTENTION:
-- 
2.15.1

Reply via email to