aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorK. Y. Srinivasan <kys@microsoft.com>2013-06-04 15:05:05 -0400
committerJames Bottomley <JBottomley@Parallels.com>2013-06-26 22:54:49 -0400
commit893def38211980cf9581a74dfdc66be4d77a1db6 (patch)
tree9fb7b4b6a2728b7707cfa54cf621353042f8a0cb
parent1f34923c8a7d5512757318ff728fef24b1f50c9a (diff)
[SCSI] storvsc: Increase the value of scsi timeout for storvsc devices
The standard scsi timeout is not appropriate in some of the environments where Hyper-V is deployed. Set this timeout appropriately for all devices managed by this driver. On cloud environments where storage latencies may be unbounded, having the scsi layer initiating recovery can be problematic since (a) the host is already implementing a variety of recovery strategies and (b) implementing a recovery strategy at the VM level may be more appropriate in cases where storage latencies exceed a certain threshold. Signed-off-by: K. Y. Srinivasan <kys@microsoft.com> Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com> Signed-off-by: James Bottomley <JBottomley@Parallels.com>
-rw-r--r--drivers/scsi/storvsc_drv.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 16a3a0cc9672..ede8694781d6 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -221,6 +221,11 @@ static int storvsc_ringbuffer_size = (20 * PAGE_SIZE);
221module_param(storvsc_ringbuffer_size, int, S_IRUGO); 221module_param(storvsc_ringbuffer_size, int, S_IRUGO);
222MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size (bytes)"); 222MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size (bytes)");
223 223
224/*
225 * Timeout in seconds for all devices managed by this driver.
226 */
227static int storvsc_timeout = 180;
228
224#define STORVSC_MAX_IO_REQUESTS 128 229#define STORVSC_MAX_IO_REQUESTS 128
225 230
226/* 231/*
@@ -1204,6 +1209,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice)
1204 1209
1205 blk_queue_bounce_limit(sdevice->request_queue, BLK_BOUNCE_ANY); 1210 blk_queue_bounce_limit(sdevice->request_queue, BLK_BOUNCE_ANY);
1206 1211
1212 blk_queue_rq_timeout(sdevice->request_queue, (storvsc_timeout * HZ));
1213
1207 sdevice->no_write_same = 1; 1214 sdevice->no_write_same = 1;
1208 1215
1209 return 0; 1216 return 0;