[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <53BFB3F7.7010304@suse.de>
Date: Fri, 11 Jul 2014 11:52:55 +0200
From: Hannes Reinecke <hare@...e.de>
To: KY Srinivasan <kys@...rosoft.com>,
Christoph Hellwig <hch@...radead.org>
CC: "linux-kernel@...r.kernel.org" <linux-kernel@...r.kernel.org>,
"devel@...uxdriverproject.org" <devel@...uxdriverproject.org>,
"ohering@...e.com" <ohering@...e.com>,
"jbottomley@...allels.com" <jbottomley@...allels.com>,
"jasowang@...hat.com" <jasowang@...hat.com>,
"apw@...onical.com" <apw@...onical.com>,
"linux-scsi@...r.kernel.org" <linux-scsi@...r.kernel.org>
Subject: Re: [PATCH 6/8] Drivers: scsi: storvsc: Implement an abort handler
On 07/11/2014 12:26 AM, KY Srinivasan wrote:
>
>
>> -----Original Message-----
>> From: Christoph Hellwig [mailto:hch@...radead.org]
>> Sent: Thursday, July 10, 2014 3:13 AM
>> To: KY Srinivasan
>> Cc: Christoph Hellwig; linux-kernel@...r.kernel.org;
>> devel@...uxdriverproject.org; ohering@...e.com;
>> jbottomley@...allels.com; jasowang@...hat.com; apw@...onical.com;
>> linux-scsi@...r.kernel.org
>> Subject: Re: [PATCH 6/8] Drivers: scsi: storvsc: Implement an abort handler
>>
>>
>> Note that you could increase the timeout and/or implement an
>> eh_timed_out handler that just returns BLK_EH_RESET_TIMER, but if the
>> completion takes too long the expectation is that a command will eventually
>> finish instead of beeing delayed by an unmound amount.
>
> I like this idea; I will implement a eh_timed_out_handler.
>
Something like this should be sufficient:
diff --git a/drivers/scsi/storvsc_drv.c b/drivers/scsi/storvsc_drv.c
index e71a0d7..630ae81 100644
--- a/drivers/scsi/storvsc_drv.c
+++ b/drivers/scsi/storvsc_drv.c
@@ -1468,6 +1468,12 @@ static int storvsc_get_chs(struct scsi_device
*sdev, stru
ct block_device * bdev,
return 0;
}
+static enum blk_eh_timer_return
+storvsc_timed_out_handler(struct scsi_cmnd *scmd)
+{
+ return BLK_EH_RESET_TIMER;
+}
+
static int storvsc_host_reset_handler(struct scsi_cmnd *scmnd)
{
struct hv_host_device *host_dev =
shost_priv(scmnd->device->host);
@@ -1687,6 +1693,7 @@ static struct scsi_host_template scsi_driver = {
.name = "storvsc_host_t",
.bios_param = storvsc_get_chs,
.queuecommand = storvsc_queuecommand,
+ .eh_timed_out = storvsc_timed_out_handler,
.eh_host_reset_handler = storvsc_host_reset_handler,
.slave_alloc = storvsc_device_alloc,
.slave_destroy = storvsc_device_destroy,
Cheers,
Hannes
--
Dr. Hannes Reinecke zSeries & Storage
hare@...e.de +49 911 74053 688
SUSE LINUX Products GmbH, Maxfeldstr. 5, 90409 Nürnberg
GF: J. Hawn, J. Guild, F. Imendörffer, HRB 16746 (AG Nürnberg)
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Powered by blists - more mailing lists