summaryrefslogtreecommitdiff
path: root/include/scsi/scsi_host.h
diff options
context:
space:
mode:
authorHannes Reinecke <hare@suse.de>2013-10-23 12:51:21 +0400
committerJames Bottomley <JBottomley@Parallels.com>2013-10-25 15:17:59 +0400
commitb45620229dd67ff1daffa8adce57f37b37860f78 (patch)
tree22f8577437188e6699fa9d1f05841ea1f545a68f /include/scsi/scsi_host.h
parent6b1e5a45d4eaa75e28f2d170ea43ab8fc6dd34d8 (diff)
downloadlinux-b45620229dd67ff1daffa8adce57f37b37860f78.tar.xz
[SCSI] 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>
Diffstat (limited to 'include/scsi/scsi_host.h')
-rw-r--r--include/scsi/scsi_host.h5
1 files changed, 5 insertions, 0 deletions
diff --git a/include/scsi/scsi_host.h b/include/scsi/scsi_host.h
index a74b7d9afe8e..546084964d55 100644
--- a/include/scsi/scsi_host.h
+++ b/include/scsi/scsi_host.h
@@ -599,6 +599,11 @@ struct Scsi_Host {
unsigned int host_no; /* Used for IOCTL_GET_IDLUN, /proc/scsi et al. */
+ /* next two fields are used to bound the time spent in error handling */
+ int eh_deadline;
+ unsigned long last_reset;
+
+
/*
* These three parameters can be used to allow for wide scsi,
* and for host adapters that support multiple busses