Skip to content

Commit

Permalink
NVMe: Make I/O timeout a module parameter
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Keith Busch authored and Matthew Wilcox committed Apr 10, 2014
1 parent 33b1e95 commit b355084
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 1 deletion.
4 changes: 4 additions & 0 deletions drivers/block/nvme-core.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,10 @@
#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);

Expand Down
3 changes: 2 additions & 1 deletion include/linux/nvme.h
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down

0 comments on commit b355084

Please sign in to comment.