diff options
| author | Keith Busch <keith.busch@intel.com> | 2014-04-04 13:43:36 -0400 |
|---|---|---|
| committer | Matthew Wilcox <matthew.r.wilcox@intel.com> | 2014-04-10 17:04:38 -0400 |
| commit | b355084a891985d4cd0ca23b1a83366af2c4232d (patch) | |
| tree | 3b819a5b20b3d752c900181afabaa06ae7f286dc | |
| parent | 33b1e95c90447ea73e37e837ea0268a894919f19 (diff) | |
NVMe: Make I/O timeout a module parameter
Increase the default timeout to 30 seconds to match SCSI.
Signed-off-by: Keith Busch <keith.busch@intel.com>
[use byte instead of ushort]
Signed-off-by: Matthew Wilcox <matthew.r.wilcox@intel.com>
| -rw-r--r-- | drivers/block/nvme-core.c | 4 | ||||
| -rw-r--r-- | include/linux/nvme.h | 3 |
2 files changed, 6 insertions, 1 deletions
diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c index ce5a4f1a3950..7c57b1d955a1 100644 --- a/drivers/block/nvme-core.c +++ b/drivers/block/nvme-core.c | |||
| @@ -50,6 +50,10 @@ | |||
| 50 | #define CQ_SIZE(depth) (depth * sizeof(struct nvme_completion)) | 50 | #define CQ_SIZE(depth) (depth * sizeof(struct nvme_completion)) |
| 51 | #define ADMIN_TIMEOUT (60 * HZ) | 51 | #define ADMIN_TIMEOUT (60 * HZ) |
| 52 | 52 | ||
| 53 | unsigned char io_timeout = 30; | ||
| 54 | module_param(io_timeout, byte, 0644); | ||
| 55 | MODULE_PARM_DESC(io_timeout, "timeout in seconds for I/O"); | ||
| 56 | |||
| 53 | static int nvme_major; | 57 | static int nvme_major; |
| 54 | module_param(nvme_major, int, 0); | 58 | module_param(nvme_major, int, 0); |
| 55 | 59 | ||
diff --git a/include/linux/nvme.h b/include/linux/nvme.h index 15d071eba8b8..1da0807c65bc 100644 --- a/include/linux/nvme.h +++ b/include/linux/nvme.h | |||
| @@ -66,7 +66,8 @@ enum { | |||
| 66 | 66 | ||
| 67 | #define NVME_VS(major, minor) (major << 16 | minor) | 67 | #define NVME_VS(major, minor) (major << 16 | minor) |
| 68 | 68 | ||
| 69 | #define NVME_IO_TIMEOUT (5 * HZ) | 69 | extern unsigned char io_timeout; |
| 70 | #define NVME_IO_TIMEOUT (io_timeout * HZ) | ||
| 70 | 71 | ||
| 71 | /* | 72 | /* |
| 72 | * Represents an NVM Express device. Each nvme_dev is a PCI function. | 73 | * Represents an NVM Express device. Each nvme_dev is a PCI function. |
