Re: [PATCH 4/9] virtio_scsi: Enable new EH timeout handler

2013-08-30 Thread Hannes Reinecke
On 08/30/2013 02:45 PM, Christoph Hellwig wrote:
>>  
>> +static enum blk_eh_timer_return virtscsi_timedout(struct scsi_cmnd *scmd)
>> +{
>> +scsi_abort_command(scmd);
>> +return BLK_EH_SCHEDULED;
>> +}
> 
> just set the method vector to scsi_abort_command here and in all the
> other trivial conversions instead of having all those pointless
> wrappers.
> 
Ok.

Cheers,

Hannes
-- 
Dr. Hannes Reinecke   zSeries & Storage
h...@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)
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/9] virtio_scsi: Enable new EH timeout handler

2013-08-30 Thread Christoph Hellwig
>  
> +static enum blk_eh_timer_return virtscsi_timedout(struct scsi_cmnd *scmd)
> +{
> + scsi_abort_command(scmd);
> + return BLK_EH_SCHEDULED;
> +}

just set the method vector to scsi_abort_command here and in all the
other trivial conversions instead of having all those pointless
wrappers.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/9] virtio_scsi: Enable new EH timeout handler

2013-06-12 Thread Asias He
On Mon, Jun 10, 2013 at 09:40:53AM +0200, Hannes Reinecke wrote:
> Signed-off-by: Hannes Reinecke 

Reviewed-by: Asias He 

> ---
>  drivers/scsi/virtio_scsi.c | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index 2168258..1efd219 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -654,6 +654,11 @@ static int virtscsi_abort(struct scsi_cmnd *sc)
>   return virtscsi_tmf(vscsi, cmd);
>  }
>  
> +static enum blk_eh_timer_return virtscsi_timedout(struct scsi_cmnd *scmd)
> +{
> + return scsi_abort_command(scmd);
> +}
> +
>  static int virtscsi_target_alloc(struct scsi_target *starget)
>  {
>   struct virtio_scsi_target_state *tgt =
> @@ -683,6 +688,7 @@ static struct scsi_host_template 
> virtscsi_host_template_single = {
>   .queuecommand = virtscsi_queuecommand_single,
>   .eh_abort_handler = virtscsi_abort,
>   .eh_device_reset_handler = virtscsi_device_reset,
> + .eh_timed_out = virtscsi_timedout,
>  
>   .can_queue = 1024,
>   .dma_boundary = UINT_MAX,
> @@ -699,6 +705,7 @@ static struct scsi_host_template 
> virtscsi_host_template_multi = {
>   .queuecommand = virtscsi_queuecommand_multi,
>   .eh_abort_handler = virtscsi_abort,
>   .eh_device_reset_handler = virtscsi_device_reset,
> + .eh_timed_out = virtscsi_timedout,
>  
>   .can_queue = 1024,
>   .dma_boundary = UINT_MAX,
> -- 
> 1.7.12.4
> 
> --
> To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
> the body of a message to majord...@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html

-- 
Asias
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html


Re: [PATCH 4/9] virtio_scsi: Enable new EH timeout handler

2013-06-12 Thread Paolo Bonzini
Il 10/06/2013 03:40, Hannes Reinecke ha scritto:
> Signed-off-by: Hannes Reinecke 
> ---
>  drivers/scsi/virtio_scsi.c | 7 +++
>  1 file changed, 7 insertions(+)
> 
> diff --git a/drivers/scsi/virtio_scsi.c b/drivers/scsi/virtio_scsi.c
> index 2168258..1efd219 100644
> --- a/drivers/scsi/virtio_scsi.c
> +++ b/drivers/scsi/virtio_scsi.c
> @@ -654,6 +654,11 @@ static int virtscsi_abort(struct scsi_cmnd *sc)
>   return virtscsi_tmf(vscsi, cmd);
>  }
>  
> +static enum blk_eh_timer_return virtscsi_timedout(struct scsi_cmnd *scmd)
> +{
> + return scsi_abort_command(scmd);
> +}
> +
>  static int virtscsi_target_alloc(struct scsi_target *starget)
>  {
>   struct virtio_scsi_target_state *tgt =
> @@ -683,6 +688,7 @@ static struct scsi_host_template 
> virtscsi_host_template_single = {
>   .queuecommand = virtscsi_queuecommand_single,
>   .eh_abort_handler = virtscsi_abort,
>   .eh_device_reset_handler = virtscsi_device_reset,
> + .eh_timed_out = virtscsi_timedout,
>  
>   .can_queue = 1024,
>   .dma_boundary = UINT_MAX,
> @@ -699,6 +705,7 @@ static struct scsi_host_template 
> virtscsi_host_template_multi = {
>   .queuecommand = virtscsi_queuecommand_multi,
>   .eh_abort_handler = virtscsi_abort,
>   .eh_device_reset_handler = virtscsi_device_reset,
> + .eh_timed_out = virtscsi_timedout,
>  
>   .can_queue = 1024,
>   .dma_boundary = UINT_MAX,
> 

Acked-by: Paolo Bonzini 
--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majord...@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html