Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-11-04 Thread James Bottomley
On Mon, 2013-11-04 at 16:43 +0100, Hannes Reinecke wrote: > On 11/04/2013 03:50 PM, James Bottomley wrote: > > On Mon, 2013-11-04 at 15:46 +0100, Hannes Reinecke wrote: > >> On 11/04/2013 03:25 PM, James Bottomley wrote: > >>> On Mon, 2013-11-04 at 14:36 +0100, Hannes Reinecke wrote: > On 10/3

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-11-04 Thread Hannes Reinecke
On 11/04/2013 03:50 PM, James Bottomley wrote: > On Mon, 2013-11-04 at 15:46 +0100, Hannes Reinecke wrote: >> On 11/04/2013 03:25 PM, James Bottomley wrote: >>> On Mon, 2013-11-04 at 14:36 +0100, Hannes Reinecke wrote: On 10/31/2013 04:49 PM, Christoph Hellwig wrote: > Looks reasonable to

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-11-04 Thread James Bottomley
On Mon, 2013-11-04 at 15:46 +0100, Hannes Reinecke wrote: > On 11/04/2013 03:25 PM, James Bottomley wrote: > > On Mon, 2013-11-04 at 14:36 +0100, Hannes Reinecke wrote: > >> On 10/31/2013 04:49 PM, Christoph Hellwig wrote: > >>> Looks reasonable to me, but a few minor nitpicks: > >>> > +

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-11-04 Thread Hannes Reinecke
On 11/04/2013 03:25 PM, James Bottomley wrote: > On Mon, 2013-11-04 at 14:36 +0100, Hannes Reinecke wrote: >> On 10/31/2013 04:49 PM, Christoph Hellwig wrote: >>> Looks reasonable to me, but a few minor nitpicks: >>> + spin_lock_irqsave(sdev->host->host_lock, flags); + if (scsi_host_eh_

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-11-04 Thread James Bottomley
On Mon, 2013-11-04 at 14:36 +0100, Hannes Reinecke wrote: > On 10/31/2013 04:49 PM, Christoph Hellwig wrote: > > Looks reasonable to me, but a few minor nitpicks: > > > >> + spin_lock_irqsave(sdev->host->host_lock, flags); > >> + if (scsi_host_eh_past_deadline(sdev->host)) { > > > > I don't hav

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-11-04 Thread Hannes Reinecke
On 10/31/2013 04:49 PM, Christoph Hellwig wrote: > Looks reasonable to me, but a few minor nitpicks: > >> +spin_lock_irqsave(sdev->host->host_lock, flags); >> +if (scsi_host_eh_past_deadline(sdev->host)) { > > I don't have the implementation of scsi_host_eh_past_deadline in my > local tre

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-10-31 Thread Ren Mingxin
Hi, Hannes: I'm sorry that I don't know why you didn't consider my former patch below which not only raises the minimum valid value of 'eh_deadline' as '0' for your former patchset but also includes some fix for your this patchset: http://www.spinics.net/lists/linux-scsi/msg69361.html If you th

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-10-31 Thread Christoph Hellwig
Looks reasonable to me, but a few minor nitpicks: > + spin_lock_irqsave(sdev->host->host_lock, flags); > + if (scsi_host_eh_past_deadline(sdev->host)) { I don't have the implementation of scsi_host_eh_past_deadline in my local tree, but do we really need the host lock for it? > +int > +s

[PATCH 2/3] scsi: improved eh timeout handler

2013-10-31 Thread Hannes Reinecke
When a command runs into a timeout we need to send an 'ABORT TASK' TMF. This is typically done by the 'eh_abort_handler' LLDD callback. Conceptually, however, this function is a normal SCSI command, so there is no need to enter the error handler. This patch implements a new scsi_abort_command() f

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-10-02 Thread Hannes Reinecke
On 09/20/2013 09:59 AM, Ren Mingxin wrote: Hi, Hannes: On 09/02/2013 07:58 PM, Hannes Reinecke wrote: +scmd_eh_abort_handler(struct work_struct *work) +{ +struct scsi_cmnd *scmd = +container_of(work, struct scsi_cmnd, abort_work.work); +struct scsi_device *sdev = scmd->device; +

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-09-20 Thread Ren Mingxin
Hi, Hannes: On 09/02/2013 07:58 PM, Hannes Reinecke wrote: +scmd_eh_abort_handler(struct work_struct *work) +{ + struct scsi_cmnd *scmd = + container_of(work, struct scsi_cmnd, abort_work.work); + struct scsi_device *sdev = scmd->device; + unsigned long flags; +

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-09-12 Thread Hannes Reinecke
On 09/11/2013 11:16 AM, Ren Mingxin wrote: Hi, Hannes: On 09/02/2013 07:58 PM, Hannes Reinecke wrote: If abort succeeds the command is either retried or terminated, depending on the number of allowed retries. However, 'eh_eflags' records the abort, so if the retry would fail again the command i

Re: [PATCH 2/3] scsi: improved eh timeout handler

2013-09-11 Thread Ren Mingxin
Hi, Hannes: On 09/02/2013 07:58 PM, Hannes Reinecke wrote: If abort succeeds the command is either retried or terminated, depending on the number of allowed retries. However, 'eh_eflags' records the abort, so if the retry would fail again the command is pushed onto the error handler without tryi

[PATCH 2/3] scsi: improved eh timeout handler

2013-09-02 Thread Hannes Reinecke
When a command runs into a timeout we need to send an 'ABORT TASK' TMF. This is typically done by the 'eh_abort_handler' LLDD callback. Conceptually, however, this function is a normal SCSI command, so there is no need to enter the error handler. This patch implements a new scsi_abort_command() f