[SRU][T][PATCH 2/2] nvme: update timeout module parameter type

Daniel Axtens daniel.axtens at canonical.com
Tue Nov 21 09:03:49 UTC 2017


From: Marc Olson <marcolso at amazon.com>

BugLink: https://bugs.launchpad.net/bugs/1729119

The underlying blk_mq_tag_set, and request timeout parameters support an
unsigned int. Extend the size of the nvme module parameters for io and
admin commands to match.

Signed-off-by: Marc Olson <marcolso at amazon.com>
Signed-off-by: Christoph Hellwig <hch at lst.de>
(backported from commit 8ae4e4477d8f5cc7736816a0492f82934ca32ab7)
[note: *only* the io_timeout parameter has been backported]
Signed-off-by: Daniel Axtens <daniel.axtens at canonical.com>
---
 drivers/block/nvme-core.c | 4 ++--
 include/linux/nvme.h      | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/block/nvme-core.c b/drivers/block/nvme-core.c
index 05357358c62f..30e418e2c872 100644
--- a/drivers/block/nvme-core.c
+++ b/drivers/block/nvme-core.c
@@ -55,8 +55,8 @@ static unsigned char shutdown_timeout = 5;
 module_param(shutdown_timeout, byte, 0644);
 MODULE_PARM_DESC(shutdown_timeout, "timeout in seconds for controller shutdown");
 
-unsigned char io_timeout = 30;
-module_param(io_timeout, byte, 0644);
+unsigned int io_timeout = 30;
+module_param(io_timeout, uint, 0644);
 MODULE_PARM_DESC(io_timeout, "timeout in seconds for I/O");
 
 static int nvme_major;
diff --git a/include/linux/nvme.h b/include/linux/nvme.h
index cdccd015bdc3..c90455546e69 100644
--- a/include/linux/nvme.h
+++ b/include/linux/nvme.h
@@ -66,7 +66,7 @@ enum {
 
 #define NVME_VS(major, minor)	(major << 16 | minor)
 
-extern unsigned char io_timeout;
+extern unsigned int io_timeout;
 #define NVME_IO_TIMEOUT	(io_timeout * HZ)
 
 /*
-- 
2.11.0





More information about the kernel-team mailing list