From 7e660100d85af860e7ad763202fff717adcdaacd Mon Sep 17 00:00:00 2001 From: James Bottomley Date: Fri, 4 Oct 2013 21:42:24 +0000 Subject: [SCSI] Derive the FLUSH_TIMEOUT from the basic I/O timeout Rather than having a separate constant for specifying the timeout on FLUSH operations, use the basic I/O timeout value that is already configurable on a per target basis to derive the FLUSH timeout. Looking at the current definitions of these timeout values, the FLUSH operation is supposed to have a value that is twice the normal timeout value. This patch preserves this relationship while leveraging the flexibility of specifying the I/O timeout. Based on a prior patch by KY Srinivasan Reviewed-by: KY Srinivasan Signed-off-by: James Bottomley --- drivers/scsi/sd.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'drivers/scsi/sd.h') diff --git a/drivers/scsi/sd.h b/drivers/scsi/sd.h index 7a049de22051..26895ff247c5 100644 --- a/drivers/scsi/sd.h +++ b/drivers/scsi/sd.h @@ -13,7 +13,11 @@ */ #define SD_TIMEOUT (30 * HZ) #define SD_MOD_TIMEOUT (75 * HZ) -#define SD_FLUSH_TIMEOUT (60 * HZ) +/* + * Flush timeout is a multiplier over the standard device timeout which is + * user modifiable via sysfs but initially set to SD_TIMEOUT + */ +#define SD_FLUSH_TIMEOUT_MULTIPLIER 2 #define SD_WRITE_SAME_TIMEOUT (120 * HZ) /* -- cgit v1.2.3