[PATCH 1/9] nvme-core: use uint type for shutdown timeout
Sagi Grimberg
sagi at grimberg.me
Thu Mar 23 00:56:13 PDT 2023
> Use consistent type unsigned int for shutdown_timeout that matches
> other timeout types.
Does it make sense to allow shutdown timeout to be that long?
Also, use this oppurtunity to print default
> timeout values in the module parameter description that saves a trip
> to source code.
Or simply reading from sys modparams, which one may do anyway.
>
> Signed-off-by: Chaitanya Kulkarni <kch at nvidia.com>
> ---
> drivers/nvme/host/core.c | 10 +++++-----
> 1 file changed, 5 insertions(+), 5 deletions(-)
>
> diff --git a/drivers/nvme/host/core.c b/drivers/nvme/host/core.c
> index d4be525f8100..c9636be68d74 100644
> --- a/drivers/nvme/host/core.c
> +++ b/drivers/nvme/host/core.c
> @@ -43,17 +43,17 @@ struct nvme_ns_info {
>
> unsigned int admin_timeout = 60;
> module_param(admin_timeout, uint, 0644);
> -MODULE_PARM_DESC(admin_timeout, "timeout in seconds for admin commands");
> +MODULE_PARM_DESC(admin_timeout, "timeout in seconds for admin commands, default:60");
> EXPORT_SYMBOL_GPL(admin_timeout);
>
> unsigned int nvme_io_timeout = 30;
> module_param_named(io_timeout, nvme_io_timeout, uint, 0644);
> -MODULE_PARM_DESC(io_timeout, "timeout in seconds for I/O");
> +MODULE_PARM_DESC(io_timeout, "timeout in seconds for I/O, default:30");
> EXPORT_SYMBOL_GPL(nvme_io_timeout);
>
> -static unsigned char shutdown_timeout = 5;
> -module_param(shutdown_timeout, byte, 0644);
> -MODULE_PARM_DESC(shutdown_timeout, "timeout in seconds for controller shutdown");
> +static unsigned int shutdown_timeout = 5;
> +module_param(shutdown_timeout, uint, 0644);
> +MODULE_PARM_DESC(shutdown_timeout, "timeout in seconds for controller shutdown default:5");
>
> static u8 nvme_max_retries = 5;
> module_param_named(max_retries, nvme_max_retries, byte, 0644);
More information about the Linux-nvme
mailing list