scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA'
authorHannes Reinecke <hare@suse.de>
Fri, 19 Feb 2016 08:17:12 +0000 (09:17 +0100)
committerMartin K. Petersen <martin.petersen@oracle.com>
Wed, 24 Feb 2016 02:27:02 +0000 (21:27 -0500)
Add a new blacklist flag BLIST_SYNC_ALUA to instruct the
alua device handler to use synchronous command submission
for ALUA commands.

Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hannes Reinecke <hare@suse.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/device_handler/scsi_dh_alua.c
drivers/scsi/scsi_devinfo.c
drivers/scsi/scsi_scan.c
include/scsi/scsi_device.h
include/scsi/scsi_devinfo.h

index a3cb06955adce1cb8c77b57c47ed747ad5f64af0..fbbe85e750a89eb2167edfba341ff749c3e9c051 100644 (file)
@@ -366,6 +366,8 @@ static int alua_check_vpd(struct scsi_device *sdev, struct alua_dh_data *h,
                /* port group has changed. Update to new port group */
                rcu_assign_pointer(h->pg, pg);
        }
+       if (sdev->synchronous_alua)
+               pg->flags |= ALUA_SYNC_STPG;
        alua_rtpg_queue(h->pg, sdev, NULL);
        spin_unlock(&h->pg_lock);
 
index bbfbfd9e5aa391ff65d5e31859f31765bb5b77c3..3408578b08d6adb23fe38c6a8c84c066236bc4ad 100644 (file)
@@ -220,6 +220,8 @@ static struct {
        {"NAKAMICH", "MJ-5.16S", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
        {"NEC", "PD-1 ODX654P", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
        {"NEC", "iStorage", NULL, BLIST_REPORTLUN2},
+       {"NETAPP", "LUN C-Mode", NULL, BLIST_SYNC_ALUA},
+       {"NETAPP", "INF-01-00", NULL, BLIST_SYNC_ALUA},
        {"NRC", "MBR-7", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
        {"NRC", "MBR-7.4", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
        {"PIONEER", "CD-ROM DRM-600", NULL, BLIST_FORCELUN | BLIST_SINGLELUN},
index 1f02e842b9d13c6c7eb6ec6319fe98adf7dac8ea..420239c2861c35f048ff429e7709c61e3dc7bb01 100644 (file)
@@ -964,6 +964,9 @@ static int scsi_add_lun(struct scsi_device *sdev, unsigned char *inq_result,
        if (*bflags & BLIST_NO_DIF)
                sdev->no_dif = 1;
 
+       if (*bflags & BLIST_SYNC_ALUA)
+               sdev->synchronous_alua = 1;
+
        sdev->eh_timeout = SCSI_DEFAULT_EH_TIMEOUT;
 
        if (*bflags & BLIST_TRY_VPD_PAGES)
index 9173ab5a6f724a51bf9832958bcbb3fb4905c442..4af2b240c4d17323ee2fb832006940451eacebee 100644 (file)
@@ -176,6 +176,7 @@ struct scsi_device {
        unsigned no_dif:1;      /* T10 PI (DIF) should be disabled */
        unsigned broken_fua:1;          /* Don't set FUA bit */
        unsigned lun_in_cdb:1;          /* Store LUN bits in CDB[1] */
+       unsigned synchronous_alua:1;    /* Synchronous ALUA commands */
 
        atomic_t disk_events_disable_depth; /* disable depth for disk events */
 
index 96e3f56519e7d9831e4b4c4ce19f78afd436242f..9f750cb63b035be79caec04e0b2866fbabe79d49 100644 (file)
@@ -37,5 +37,6 @@
 #define BLIST_TRY_VPD_PAGES    0x10000000 /* Attempt to read VPD pages */
 #define BLIST_NO_RSOC          0x20000000 /* don't try to issue RSOC */
 #define BLIST_MAX_1024         0x40000000 /* maximum 1024 sector cdb length */
+#define BLIST_SYNC_ALUA                0x80000000 /* Synchronous ALUA commands */
 
 #endif