public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: "K. Y. Srinivasan" <kys@microsoft.com>
To: gregkh@linuxfoundation.org, linux-kernel@vger.kernel.org,
	devel@linuxdriverproject.org, ohering@suse.com,
	jbottomley@parallels.com, hch@infradead.org,
	linux-scsi@vger.kernel.org, apw@canonical.com,
	jasowang@redhat.com
Cc: "K. Y. Srinivasan" <kys@microsoft.com>
Subject: [PATCH 3/6] Drivers: scsi: storvsc: Make the scsi timeout a module parameter
Date: Wed, 15 May 2013 15:02:31 -0700	[thread overview]
Message-ID: <1368655354-27651-3-git-send-email-kys@microsoft.com> (raw)
In-Reply-To: <1368655354-27651-1-git-send-email-kys@microsoft.com>

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. Further make this a module parameter.

Signed-off-by: K. Y. Srinivasan <kys@microsoft.com>
Reviewed-by: Haiyang Zhang <haiyangz@microsoft.com>
---
 drivers/scsi/storvsc_drv.c |    9 +++++++++
 1 files changed, 9 insertions(+), 0 deletions(-)

diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index 16a3a0c..8d29a95 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -221,6 +221,13 @@ 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;
+module_param(storvsc_timeout, uint, (S_IRUGO | S_IWUSR));
+MODULE_PARM_DESC(storvsc_timeout, "Device timeout (seconds)");
+
 #define STORVSC_MAX_IO_REQUESTS				128
 
 /*
@@ -1204,6 +1211,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;
-- 
1.7.4.1


  parent reply	other threads:[~2013-05-15 21:28 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2013-05-15 22:02 [PATCH 0/6] Drivers: hv/scsi: Implement multi-channel support K. Y. Srinivasan
2013-05-15 22:02 ` [PATCH 1/6] Drivers: hv: vmbus: " K. Y. Srinivasan
2013-05-15 22:02   ` [PATCH 2/6] Drivers: hv: Add the GUID fot synthetic fiber channel device K. Y. Srinivasan
2013-05-16  4:01     ` Greg KH
2013-05-15 22:02   ` K. Y. Srinivasan [this message]
2013-05-15 22:02   ` [PATCH 4/6] Drivers: scsi: storvsc: Update the storage protocol to win8 level K. Y. Srinivasan
2013-05-15 22:02   ` [PATCH 5/6] Drivers: scsi: storvsc: Implement multi-channel support K. Y. Srinivasan
2013-05-15 22:02   ` [PATCH 6/6] Drivers: scsi: storvsc: Support FC devices K. Y. Srinivasan
2013-05-16  4:01   ` [PATCH 1/6] Drivers: hv: vmbus: Implement multi-channel support Greg KH
2013-05-16 10:18     ` KY Srinivasan
2013-05-16  4:00 ` [PATCH 0/6] Drivers: hv/scsi: " Greg KH
2013-05-16 10:15   ` KY Srinivasan

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1368655354-27651-3-git-send-email-kys@microsoft.com \
    --to=kys@microsoft.com \
    --cc=apw@canonical.com \
    --cc=devel@linuxdriverproject.org \
    --cc=gregkh@linuxfoundation.org \
    --cc=hch@infradead.org \
    --cc=jasowang@redhat.com \
    --cc=jbottomley@parallels.com \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-scsi@vger.kernel.org \
    --cc=ohering@suse.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox