Add 'eh_deadline' to limit SCSI EH runtime
authorHannes Reinecke <hare@suse.de>
Thu, 26 Jun 2014 01:57:35 +0000 (19:57 -0600)
committerJens Axboe <axboe@fb.com>
Thu, 2 Apr 2015 18:12:26 +0000 (12:12 -0600)
commit753028af532225ec4dd831f9124076b9b3b5994c
tree54481adfb461fb349d50e974701ad66043e00dce
parent8137efac0fdfc419d1ff95b1d2eeb71076205b9d
Add 'eh_deadline' to limit SCSI EH runtime

This patchs adds an 'eh_deadline' sysfs attribute to the scsi
host which limits the overall runtime of the SCSI EH.
The 'eh_deadline' value is stored in the now obsolete field
'resetting'.
When a command is failed the start time of the EH is stored
in 'last_reset'. If the overall runtime of the SCSI EH is longer
than last_reset + eh_deadline, the EH is short-circuited and
falls through to issue a host reset only.

[jejb: add comments in Scsi_Host about new fields]
Signed-off-by: Hannes Reinecke <hare@suse.de>
Signed-off-by: James Bottomley <JBottomley@Parallels.com>
drivers/scsi/hosts.c
drivers/scsi/scsi_error.c
drivers/scsi/scsi_sysfs.c
include/scsi/scsi_host.h