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

2014-02-11 Thread Christoph Hellwig
Hi Hannes, I'll need a little reminder how we came to the conclusion that the cancel_delayed_work in scsi_put_command was safe and we didn't need a cancel_delayed_work_sync or flush_delayed_work. I remember we had that discussion, but it seems that same doesn't apply to the equivalent call in

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

2014-02-11 Thread Hannes Reinecke
On 02/11/2014 03:01 PM, Christoph Hellwig wrote: Hi Hannes, I'll need a little reminder how we came to the conclusion that the cancel_delayed_work in scsi_put_command was safe and we didn't need a cancel_delayed_work_sync or flush_delayed_work. I remember we had that discussion, but it

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

2014-02-11 Thread Christoph Hellwig
On Tue, Feb 11, 2014 at 03:29:10PM +0100, Hannes Reinecke wrote: Well, _actually_ the cancel_delayed_work should be pointless; I've just added it as a terminal measure here. (It'd actually be an idea to insert a BUG_ON() here ...) Thing is whenever the eh_timeout thingie kicks in we most

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

2014-02-11 Thread Hannes Reinecke
On 02/12/2014 08:45 AM, Christoph Hellwig wrote: On Tue, Feb 11, 2014 at 03:29:10PM +0100, Hannes Reinecke wrote: Well, _actually_ the cancel_delayed_work should be pointless; I've just added it as a terminal measure here. (It'd actually be an idea to insert a BUG_ON() here ...) Thing is

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

2013-11-11 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()

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

2013-11-09 Thread James Bottomley
On Thu, 2013-11-07 at 07:45 +0100, Hannes Reinecke wrote: On 11/06/2013 06:23 PM, Mike Christie wrote: On 11/05/2013 10:48 PM, Hannes Reinecke wrote: On 11/05/2013 08:19 PM, Mike Christie wrote: On 11/04/2013 11:05 PM, Hannes Reinecke wrote: + +scmd-eh_eflags |=

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

2013-11-09 Thread Hannes Reinecke
On 11/09/2013 09:35 AM, James Bottomley wrote: On Thu, 2013-11-07 at 07:45 +0100, Hannes Reinecke wrote: On 11/06/2013 06:23 PM, Mike Christie wrote: On 11/05/2013 10:48 PM, Hannes Reinecke wrote: On 11/05/2013 08:19 PM, Mike Christie wrote: On 11/04/2013 11:05 PM, Hannes Reinecke wrote: +

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

2013-11-08 Thread Hannes Reinecke
On 11/07/2013 07:33 PM, Douglas Gilbert wrote: On 13-11-07 01:45 AM, Hannes Reinecke wrote: On 11/06/2013 06:23 PM, Mike Christie wrote: On 11/05/2013 10:48 PM, Hannes Reinecke wrote: On 11/05/2013 08:19 PM, Mike Christie wrote: On 11/04/2013 11:05 PM, Hannes Reinecke wrote: + +

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

2013-11-07 Thread Douglas Gilbert
On 13-11-07 01:45 AM, Hannes Reinecke wrote: On 11/06/2013 06:23 PM, Mike Christie wrote: On 11/05/2013 10:48 PM, Hannes Reinecke wrote: On 11/05/2013 08:19 PM, Mike Christie wrote: On 11/04/2013 11:05 PM, Hannes Reinecke wrote: + + scmd-eh_eflags |= SCSI_EH_ABORT_SCHEDULED; +

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

2013-11-06 Thread Christoph Hellwig
On Tue, Nov 05, 2013 at 11:19:27AM -0800, Mike Christie wrote: + scmd-eh_eflags |= SCSI_EH_ABORT_SCHEDULED; + SCSI_LOG_ERROR_RECOVERY(3, + scmd_printk(KERN_INFO, scmd, + scmd %p abort scheduled\n, scmd)); + schedule_delayed_work(scmd-abort_work, HZ /

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

2013-11-06 Thread Mike Christie
On 11/05/2013 10:48 PM, Hannes Reinecke wrote: On 11/05/2013 08:19 PM, Mike Christie wrote: On 11/04/2013 11:05 PM, Hannes Reinecke wrote: + + scmd-eh_eflags |= SCSI_EH_ABORT_SCHEDULED; + SCSI_LOG_ERROR_RECOVERY(3, + scmd_printk(KERN_INFO, scmd, + scmd %p

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

2013-11-06 Thread Hannes Reinecke
On 11/06/2013 03:47 PM, Christoph Hellwig wrote: On Tue, Nov 05, 2013 at 11:19:27AM -0800, Mike Christie wrote: + scmd-eh_eflags |= SCSI_EH_ABORT_SCHEDULED; + SCSI_LOG_ERROR_RECOVERY(3, + scmd_printk(KERN_INFO, scmd, + scmd %p abort scheduled\n, scmd)); +

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

2013-11-06 Thread Hannes Reinecke
On 11/06/2013 06:23 PM, Mike Christie wrote: On 11/05/2013 10:48 PM, Hannes Reinecke wrote: On 11/05/2013 08:19 PM, Mike Christie wrote: On 11/04/2013 11:05 PM, Hannes Reinecke wrote: + + scmd-eh_eflags |= SCSI_EH_ABORT_SCHEDULED; + SCSI_LOG_ERROR_RECOVERY(3, +

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

2013-11-05 Thread Mike Christie
On 11/04/2013 11:05 PM, Hannes Reinecke wrote: + + scmd-eh_eflags |= SCSI_EH_ABORT_SCHEDULED; + SCSI_LOG_ERROR_RECOVERY(3, + scmd_printk(KERN_INFO, scmd, + scmd %p abort scheduled\n, scmd)); + schedule_delayed_work(scmd-abort_work, HZ / 100);

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

2013-11-05 Thread Hannes Reinecke
On 11/05/2013 08:19 PM, Mike Christie wrote: On 11/04/2013 11:05 PM, Hannes Reinecke wrote: + +scmd-eh_eflags |= SCSI_EH_ABORT_SCHEDULED; +SCSI_LOG_ERROR_RECOVERY(3, +scmd_printk(KERN_INFO, scmd, +scmd %p abort scheduled\n, scmd)); +

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

2013-11-04 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()