]> git.proxmox.com Git - mirror_ubuntu-jammy-kernel.git/commitdiff
scsi: devinfo: add BLIST_RETRY_ITF for EMC Symmetrix
authorMartin Wilck <mwilck@suse.com>
Tue, 17 Apr 2018 23:35:10 +0000 (01:35 +0200)
committerMartin K. Petersen <martin.petersen@oracle.com>
Fri, 20 Apr 2018 23:14:36 +0000 (19:14 -0400)
EMC Symmetrix returns 'internal target error' for a variety of
conditions, most of which will be transient.  So we should always retry
it, even with failfast set.  Otherwise we'd get spurious path flaps with
multipath.

Signed-off-by: Martin Wilck <mwilck@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/scsi_devinfo.c
drivers/scsi/scsi_error.c
include/scsi/scsi_devinfo.h

index 9603f3ef18aa76da265acb43b661851089a7ff99..87bc50686ac653cb6463129ba1d48571809dc9e7 100644 (file)
@@ -161,7 +161,8 @@ static struct {
        {"DGC", "RAID", NULL, BLIST_SPARSELUN}, /* EMC CLARiiON, storage on LUN 0 */
        {"DGC", "DISK", NULL, BLIST_SPARSELUN}, /* EMC CLARiiON, no storage on LUN 0 */
        {"EMC",  "Invista", "*", BLIST_SPARSELUN | BLIST_LARGELUN},
-       {"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN | BLIST_REPORTLUN2},
+       {"EMC", "SYMMETRIX", NULL, BLIST_SPARSELUN | BLIST_LARGELUN |
+        BLIST_REPORTLUN2 | BLIST_RETRY_ITF},
        {"EMULEX", "MD21/S2     ESDI", NULL, BLIST_SINGLELUN},
        {"easyRAID", "16P", NULL, BLIST_NOREPORTLUN},
        {"easyRAID", "X6P", NULL, BLIST_NOREPORTLUN},
index 946039117bf4f2c655db2bb1129ee75df1f1df21..633b198ed895e0d07b48924b8a3d7491089893a1 100644 (file)
@@ -38,6 +38,7 @@
 #include <scsi/scsi_host.h>
 #include <scsi/scsi_ioctl.h>
 #include <scsi/scsi_dh.h>
+#include <scsi/scsi_devinfo.h>
 #include <scsi/sg.h>
 
 #include "scsi_priv.h"
@@ -525,6 +526,9 @@ int scsi_check_sense(struct scsi_cmnd *scmd)
                if (sshdr.asc == 0x10) /* DIF */
                        return SUCCESS;
 
+               if (sshdr.asc == 0x44 && sdev->sdev_bflags & BLIST_RETRY_ITF)
+                       return ADD_TO_MLQUEUE;
+
                return NEEDS_RETRY;
        case NOT_READY:
        case UNIT_ATTENTION:
index 3434e143feff3183fc362d6e4c2eab399e867ce6..91a327edf1fa19933a49fce8f2b63128eb9681ee 100644 (file)
 #define BLIST_MAX_1024         ((__force blist_flags_t)(1ULL << 30))
 /* Use UNMAP limit for WRITE SAME */
 #define BLIST_UNMAP_LIMIT_WS   ((__force blist_flags_t)(1ULL << 31))
+/* Always retry ABORTED_COMMAND with Internal Target Failure */
+#define BLIST_RETRY_ITF                ((__force blist_flags_t)(1ULL << 32))
 
-#define __BLIST_LAST_USED BLIST_UNMAP_LIMIT_WS
+#define __BLIST_LAST_USED BLIST_RETRY_ITF
 
 #define __BLIST_HIGH_UNUSED (~(__BLIST_LAST_USED | \
                               (__force blist_flags_t) \