From: K. Y. Srinivasan Date: Tue, 4 Jun 2013 19:05:05 +0000 (-0700) Subject: [SCSI] storvsc: Increase the value of scsi timeout for storvsc devices X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=893def38211980cf9581a74dfdc66be4d77a1db6;p=linux-beck.git [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 Reviewed-by: Haiyang Zhang Signed-off-by: James Bottomley --- 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); module_param(storvsc_ringbuffer_size, int, S_IRUGO); MODULE_PARM_DESC(storvsc_ringbuffer_size, "Ring buffer size (bytes)"); +/* + * Timeout in seconds for all devices managed by this driver. + */ +static int storvsc_timeout = 180; + #define STORVSC_MAX_IO_REQUESTS 128 /* @@ -1204,6 +1209,8 @@ static int storvsc_device_configure(struct scsi_device *sdevice) blk_queue_bounce_limit(sdevice->request_queue, BLK_BOUNCE_ANY); + blk_queue_rq_timeout(sdevice->request_queue, (storvsc_timeout * HZ)); + sdevice->no_write_same = 1; return 0;