scsi: storvsc: use default I/O timeout handler for FC devices
authorLong Li <longli@microsoft.com>
Tue, 13 Jun 2017 21:34:05 +0000 (14:34 -0700)
committerMartin K. Petersen <martin.petersen@oracle.com>
Mon, 26 Jun 2017 16:33:26 +0000 (12:33 -0400)
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.

Signed-off-by: Long Li <longli@microsoft.com>
Signed-off-by: Martin K. Petersen <martin.petersen@oracle.com>
drivers/scsi/storvsc_drv.c

index 8d955db6424fb79a9f9064b3c96c6e4e92ebb3d5..3cc8d67783a1d1ab53d1acfdc2a25caa9baa6a47 100644 (file)
@@ -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;
 }