NVMe: Make I/O timeout a module parameter
authorKeith Busch <keith.busch@intel.com>
Fri, 4 Apr 2014 17:43:36 +0000 (11:43 -0600)
committerMatthew Wilcox <matthew.r.wilcox@intel.com>
Thu, 10 Apr 2014 21:04:38 +0000 (17:04 -0400)
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>
drivers/block/nvme-core.c
include/linux/nvme.h

index ce5a4f1..7c57b1d 100644 (file)
 #define CQ_SIZE(depth)         (depth * sizeof(struct nvme_completion))
 #define ADMIN_TIMEOUT  (60 * HZ)
 
+unsigned char io_timeout = 30;
+module_param(io_timeout, byte, 0644);
+MODULE_PARM_DESC(io_timeout, "timeout in seconds for I/O");
+
 static int nvme_major;
 module_param(nvme_major, int, 0);
 
index 15d071e..1da0807 100644 (file)
@@ -66,7 +66,8 @@ enum {
 
 #define NVME_VS(major, minor)  (major << 16 | minor)
 
-#define NVME_IO_TIMEOUT        (5 * HZ)
+extern unsigned char io_timeout;
+#define NVME_IO_TIMEOUT        (io_timeout * HZ)
 
 /*
  * Represents an NVM Express device.  Each nvme_dev is a PCI function.