* Re: [PATCH 15/23] scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA'
@ 2016-10-10 21:24 Xose Vazquez Perez
2016-10-11 6:00 ` Hannes Reinecke
0 siblings, 1 reply; 3+ messages in thread
From: Xose Vazquez Perez @ 2016-10-10 21:24 UTC (permalink / raw)
To: Hannes Reinecke, Stewart, Sean, George, Martin, Stankey, Robert,
Schremmer, Steven
Cc: device-mapper development, linux-scsi
Hi Hannes,
Try #2.
Is this needed for RDAC(INF-01-00) devices?
Thank you.
---cut---
commit 851cde9909dd8b6fb90fab7f4e815c8f86c85a0d
Author: Hannes Reinecke <hare@suse.de>
Date: Fri Feb 19 09:17:12 2016 +0100
scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA'
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>
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index a3cb069..fbbe85e 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -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);
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index bbfbfd9..3408578 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -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},
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 1f02e84..420239c 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -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)
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 9173ab5a..4af2b24 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -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 */
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h
index 96e3f56..9f750cb 100644
--- a/include/scsi/scsi_devinfo.h
+++ b/include/scsi/scsi_devinfo.h
@@ -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
---
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH 15/23] scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA'
2016-10-10 21:24 [PATCH 15/23] scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA' Xose Vazquez Perez
@ 2016-10-11 6:00 ` Hannes Reinecke
0 siblings, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2016-10-11 6:00 UTC (permalink / raw)
To: Xose Vazquez Perez, Stewart, Sean, George, Martin, Stankey,
Robert, Schremmer, Steven
Cc: device-mapper development, linux-scsi
On 10/10/2016 11:24 PM, Xose Vazquez Perez wrote:
> Hi Hannes,
>
> Try #2.
> Is this needed for RDAC(INF-01-00) devices?
>
Actually I have been in contact with NetApp, and they prefer _not_ to
have the RDAC arrays marked for synchronous ALUA. They have validated
things on their current firmware and the synchronous ALUA setting is not
required anymore.
Cheers,
Hannes
--
Dr. Hannes Reinecke Teamlead Storage & Networking
hare@suse.de +49 911 74053 688
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: F. Imendörffer, J. Smithard, J. Guild, D. Upmanyu, G. Norton
HRB 21284 (AG Nürnberg)
^ permalink raw reply [flat|nested] 3+ messages in thread
* [PATCH 15/23] scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA'
2016-02-08 14:34 [PATCH 00/23] ALUA device handler update, part II Hannes Reinecke
@ 2016-02-08 14:34 ` Hannes Reinecke
0 siblings, 0 replies; 3+ messages in thread
From: Hannes Reinecke @ 2016-02-08 14:34 UTC (permalink / raw)
To: Martin K. Petersen
Cc: Christoph Hellwig, Bart van Assche, James Bottomley, linux-scsi,
Ewan Milne, Hannes Reinecke, Hannes Reinecke
Add a new blacklist flag BLIST_SYNC_ALUA to instruct the
alua device handler to use synchronous command submission
for ALUA commands.
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Hannes Reinecke <hare@suse.com>
---
drivers/scsi/device_handler/scsi_dh_alua.c | 2 ++
drivers/scsi/scsi_devinfo.c | 2 ++
drivers/scsi/scsi_scan.c | 3 +++
include/scsi/scsi_device.h | 1 +
include/scsi/scsi_devinfo.h | 1 +
5 files changed, 9 insertions(+)
diff --git a/drivers/scsi/device_handler/scsi_dh_alua.c b/drivers/scsi/device_handler/scsi_dh_alua.c
index 6c578e9..f6bb1c0 100644
--- a/drivers/scsi/device_handler/scsi_dh_alua.c
+++ b/drivers/scsi/device_handler/scsi_dh_alua.c
@@ -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);
diff --git a/drivers/scsi/scsi_devinfo.c b/drivers/scsi/scsi_devinfo.c
index 47b9d13..b4ef0c6 100644
--- a/drivers/scsi/scsi_devinfo.c
+++ b/drivers/scsi/scsi_devinfo.c
@@ -218,6 +218,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},
diff --git a/drivers/scsi/scsi_scan.c b/drivers/scsi/scsi_scan.c
index 1f02e84..420239c 100644
--- a/drivers/scsi/scsi_scan.c
+++ b/drivers/scsi/scsi_scan.c
@@ -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)
diff --git a/include/scsi/scsi_device.h b/include/scsi/scsi_device.h
index 9173ab5a..4af2b24 100644
--- a/include/scsi/scsi_device.h
+++ b/include/scsi/scsi_device.h
@@ -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 */
diff --git a/include/scsi/scsi_devinfo.h b/include/scsi/scsi_devinfo.h
index 96e3f56..9f750cb 100644
--- a/include/scsi/scsi_devinfo.h
+++ b/include/scsi/scsi_devinfo.h
@@ -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
--
1.8.5.6
^ permalink raw reply related [flat|nested] 3+ messages in thread
end of thread, other threads:[~2016-10-11 6:00 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2016-10-10 21:24 [PATCH 15/23] scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA' Xose Vazquez Perez
2016-10-11 6:00 ` Hannes Reinecke
-- strict thread matches above, loose matches on Subject: below --
2016-02-08 14:34 [PATCH 00/23] ALUA device handler update, part II Hannes Reinecke
2016-02-08 14:34 ` [PATCH 15/23] scsi_dh_alua: Add new blacklist flag 'BLIST_SYNC_ALUA' Hannes Reinecke
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.