storvsc: use default I/O timeout handler for FC devices
Subsystems (2)
PATCH v2 1/1 storvsc: use default I/O timeout handler for FC devices
From: Long Li <[email protected]>
FC disks issue I/O directly to the host storage port driver, this is diffirent to VHD disks where I/O is virtualized and timeout is handled by the host VSP (Virtualization Service Provider).
FC disks are usually setup in a multipath system, and they don't want to reset timer on I/O timeout. Timeout is detected by multipath as a good time to failover and recover.
Patch v2 includes suggestions from Bart Van Assche <[email protected]>
--- drivers/scsi/storvsc_drv.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/scsi/storvsc_drv.c +4 -0
@@ -1495,6 +1495,10 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)*/ static enum blk_eh_timer_return storvsc_eh_timed_out (struct scsi_cmnd *scmnd) { +#if IS_ENABLED (CONFIG_SCSI_FC_ATTRS ) +if (scmnd->device->host->transportt == fc_transport_template) +return fc_eh_timed_out (scmnd); +#endif return BLK_EH_RESET_TIMER ; }
Signature · 1 line
2.7.4
Quoted 23 lines · Long Li
From: Long Li <[email protected]>
FC disks issue I/O directly to the host storage port driver, this is diffirent to VHD disks where I/O is virtualized and timeout is handled by the host VSP (Virtualization Service Provider).
FC disks are usually setup in a multipath system, and they don't want to reset timer on I/O timeout. Timeout is detected by multipath as a good time to failover and recover.
Patch v2 includes suggestions from Bart Van Assche <[email protected]>
Signed-off-by Long Li <[email protected]>--- drivers/scsi/storvsc_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/scsi/storvsc_drv.c +0
-0
drivers/scsi/storvsc_drv.c static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) · line 1501
Quoted 7 lines
drivers/scsi/storvsc_drv.c +4
-0@@ -1495,6 +1495,10 @@ static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)*/ static enum blk_eh_timer_return storvsc_eh_timed_out (struct scsi_cmnd *scmnd) { +#if IS_ENABLED (CONFIG_SCSI_FC_ATTRS ) +if (scmnd->device->host->transportt == fc_transport_template) +return fc_eh_timed_out (scmnd); +#endif
Can you please change the #if IS_ENABLED() to if(IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
&& scmnd->device->host->transportt == fc_transport_template)
That way we have better compiler coverage.
Thanks,
Johannes
Signature · 6 lines
Johannes Thumshirn Storage [email protected] +49 911 74053 689 SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850
Quoted 49 lines
-----Original Message-----
From: Johannes Thumshirn [mailto:[email protected]]
Sent: Wednesday, June 14, 2017 1:25 AM
To: Long Li <[email protected]>; James E.J. Bottomley <[email protected]>; Martin K. Petersen <[email protected]>; [email protected]; [email protected]; KY Srinivasan <[email protected]>; Bart Van Assche <[email protected]>; Christoph Hellwig <[email protected]>; Stephen Hemminger <[email protected]>
Cc: Long Li <[email protected]>
Subject: Re: [PATCH v2] storvsc: use default I/O timeout handler for FC devicesdrivers/scsi/storvsc_drv.c static int storvsc_host_reset_handler(struct
Quoted 23 lines · Long Li
From: Long Li <[email protected]>
FC disks issue I/O directly to the host storage port driver, this is diffirent to VHD disks where I/O is virtualized and timeout is handled by the host VSP (Virtualization Service Provider).
FC disks are usually setup in a multipath system, and they don't want to reset timer on I/O timeout. Timeout is detected by multipath as a good time to failover and recover.
Patch v2 includes suggestions from Bart Van Assche <[email protected]>
Signed-off-by Long Li <[email protected]>--- drivers/scsi/storvsc_drv.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/scsi/storvsc_drv.c +0
-0@@ -1495,6 +1495,10 @@ static int storvsc_host_reset_handler(struct
scsi_cmnd*scmnd)drivers/scsi/storvsc_drv.c static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd) · line 1501
Quoted 7 lines
drivers/scsi/storvsc_drv.c +4
-0*/ static enum blk_eh_timer_return storvsc_eh_timed_out (struct scsi_cmnd *scmnd) { +#if IS_ENABLED (CONFIG_SCSI_FC_ATTRS ) +if (scmnd->device->host->transportt == fc_transport_template) +return fc_eh_timed_out (scmnd); +#endif Can you please change the #if
IS_ENABLED()to
if(IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
Quoted 3 lines
&& scmnd->device->host->transportt == fc_transport_template)That way we have better compiler coverage.
Thank you for pointing this out.
The coding style is kept consistent with the rest of the FC related code in storvsc. E.g. the definition of fc_transport_template (and many other places):
#if IS_ENABLED(CONFIG_SCSI_FC_ATTRS)
static struct scsi_transport_template *fc_transport_template; #endif
I suggest we make another patch to fix this in all the places. This patch is mainly for fixing FC timeout.
Long
Quoted 10 lines
Thanks,
Johannes--
Johannes Thumshirn Storage
[email protected] +49 911 74053 689
SUSE LINUX GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: Felix Imendörffer, Jane Smithard, Graham Norton HRB 21284 (AG Nürnberg) Key fingerprint = EC38 9CAB C2C4 F25D 8600 D0D0 0393 969D 2D76 0850