mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH v2] storvsc: use default I/O timeout handler for FC devices
@ 2017-06-13 21:34 Long Li
  2017-06-14  8:24 ` Johannes Thumshirn
  0 siblings, 1 reply; 3+ messages in thread
From: Long Li @ 2017-06-13 21:34 UTC (permalink / raw)
  To: James E.J. Bottomley, Martin K. Petersen, linux-scsi,
	linux-kernel, KY Srinivasan, Bart Van Assche, Christoph Hellwig,
	Stephen Hemminger
  Cc: Long Li

From: Long Li <longli@microsoft.com>

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
<Bart.VanAssche@sandisk.com>

Signed-off-by: Long Li <longli@microsoft.com>
---
 drivers/scsi/storvsc_drv.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 8d955db..3cc8d67 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -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;
 }
 
-- 
2.7.4

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2017-06-14 19:20 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-06-13 21:34 [PATCH v2] storvsc: use default I/O timeout handler for FC devices Long Li
2017-06-14  8:24 ` Johannes Thumshirn
2017-06-14 19:19   ` Long Li

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®