diff options
author | Keith Busch <keith.busch@intel.com> | 2014-05-13 13:42:01 -0400 |
---|---|---|
committer | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2014-06-03 22:56:43 -0400 |
commit | 61e4ce086df0a64a555880089e3b782517c828c0 (patch) | |
tree | cb7cf2a338d9ac64e3a6c720a7c14308c281e636 /drivers/block | |
parent | 6808c5fb7fc1574c7608a38c9819f1639d89c3d0 (diff) |
NVMe: Make iod bio timeout a parameter
This was originally set to 4 times the IO timeout, but that was when
the IO timeout was 5 seconds instead of 30. 20 seconds for total time
to failure seemed more reasonable than 2 minutes for most, but other
users have requested to make this a module parameter instead.
Signed-off-by: Keith Busch <keith.busch@intel.com>
[renamed the module parameter to retry_time]
[made retry_time static]
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
Diffstat (limited to 'drivers/block')
-rw-r--r-- | drivers/block/nvme-core.c | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index 872d8e42d008..1a911067061c 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c | |||
@@ -48,12 +48,16 @@ | |||
48 | #define SQ_SIZE(depth) (depth * sizeof(struct nvme_command)) | 48 | #define SQ_SIZE(depth) (depth * sizeof(struct nvme_command)) |
49 | #define CQ_SIZE(depth) (depth * sizeof(struct nvme_completion)) | 49 | #define CQ_SIZE(depth) (depth * sizeof(struct nvme_completion)) |
50 | #define ADMIN_TIMEOUT (60 * HZ) | 50 | #define ADMIN_TIMEOUT (60 * HZ) |
51 | #define IOD_TIMEOUT (4 * NVME_IO_TIMEOUT) | 51 | #define IOD_TIMEOUT (retry_time * HZ) |
52 | 52 | ||
53 | unsigned char io_timeout = 30; | 53 | unsigned char io_timeout = 30; |
54 | module_param(io_timeout, byte, 0644); | 54 | module_param(io_timeout, byte, 0644); |
55 | MODULE_PARM_DESC(io_timeout, "timeout in seconds for I/O"); | 55 | MODULE_PARM_DESC(io_timeout, "timeout in seconds for I/O"); |
56 | 56 | ||
57 | static unsigned char retry_time = 30; | ||
58 | module_param(retry_time, byte, 0644); | ||
59 | MODULE_PARM_DESC(retry_time, "time in seconds to retry failed I/O"); | ||
60 | |||
57 | static int nvme_major; | 61 | static int nvme_major; |
58 | module_param(nvme_major, int, 0); | 62 | module_param(nvme_major, int, 0); |
59 | 63 | ||