[PATCH 6/8] Drivers: scsi: storvsc: Implement an abort handler

KY Srinivasan kys at microsoft.com
Fri Jul 11 14:49:17 UTC 2014



> -----Original Message-----
> From: Hannes Reinecke [mailto:hare at suse.de]
> Sent: Friday, July 11, 2014 2:53 AM
> To: KY Srinivasan; Christoph Hellwig
> Cc: linux-kernel at vger.kernel.org; devel at linuxdriverproject.org;
> ohering at suse.com; jbottomley at parallels.com; jasowang at redhat.com;
> apw at canonical.com; linux-scsi at vger.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 at infradead.org]
> >> Sent: Thursday, July 10, 2014 3:13 AM
> >> To: KY Srinivasan
> >> Cc: Christoph Hellwig; linux-kernel at vger.kernel.org;
> >> devel at linuxdriverproject.org; ohering at suse.com;
> >> jbottomley at parallels.com; jasowang at redhat.com; apw at canonical.com;
> >> linux-scsi at vger.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,

Thanks Hannes. Based on Christoph's feedback I have implemented exactly this patch. It is under test on Azure.
I will be re-spinning and posting the patches shortly.

K. Y
> 
> Hannes
> --
> Dr. Hannes Reinecke		      zSeries & Storage
> hare at suse.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)


More information about the devel mailing list