From 6f9e451360a5a95439f566d9113cd8252b18e368 Mon Sep 17 00:00:00 2001 From: Gleb Chesnokov Date: Mon, 20 Jun 2022 14:34:10 +0300 Subject: [PATCH] scst: Display default SCST module parameters values The 'modinfo scst' command lack of the information about default parameters values. Hence this patch. --- scst/src/scst_main.c | 15 +++++++-------- scst/src/scst_tg.c | 2 +- 2 files changed, 8 insertions(+), 9 deletions(-) diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 4371ba206..2aa991432 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -133,7 +133,6 @@ static struct mutex scst_cmd_threads_mutex; /* protected by scst_cmd_threads_mutex */ static struct list_head scst_cmd_threads_list; -int scst_threads; static struct task_struct *scst_init_cmd_thread; static struct task_struct *scst_mgmt_thread; static struct task_struct *scst_mgmt_cmd_thread; @@ -156,34 +155,34 @@ static int scst_virt_dev_last_id; /* protected by scst_mutex */ cpumask_t default_cpu_mask; -static unsigned int scst_max_cmd_mem; -unsigned int scst_max_dev_cmd_mem; -bool scst_forcibly_close_sessions; -bool scst_auto_cm_assignment = true; - spinlock_t scst_measure_latency_lock; atomic_t scst_measure_latency; +int scst_threads; module_param_named(scst_threads, scst_threads, int, S_IRUGO); MODULE_PARM_DESC(scst_threads, "SCSI target threads count"); +static unsigned int scst_max_cmd_mem; module_param_named(scst_max_cmd_mem, scst_max_cmd_mem, int, S_IRUGO); MODULE_PARM_DESC(scst_max_cmd_mem, "Maximum memory allowed to be consumed by " "all SCSI commands of all devices at any given time in MB"); +unsigned int scst_max_dev_cmd_mem; module_param_named(scst_max_dev_cmd_mem, scst_max_dev_cmd_mem, int, S_IRUGO); MODULE_PARM_DESC(scst_max_dev_cmd_mem, "Maximum memory allowed to be consumed " "by all SCSI commands of a device at any given time in MB"); +bool scst_forcibly_close_sessions; module_param_named(forcibly_close_sessions, scst_forcibly_close_sessions, bool, S_IWUSR | S_IRUGO); MODULE_PARM_DESC(forcibly_close_sessions, "If enabled, close the sessions associated with an access control group (ACG)" -" when an ACG is deleted via sysfs instead of returning -EBUSY"); +" when an ACG is deleted via sysfs instead of returning -EBUSY. (default: false)"); +bool scst_auto_cm_assignment = true; module_param_named(auto_cm_assignment, scst_auto_cm_assignment, bool, S_IWUSR | S_IRUGO); -MODULE_PARM_DESC(auto_cm_assignment, "Enables the copy managers auto registration"); +MODULE_PARM_DESC(auto_cm_assignment, "Enables the copy managers auto registration. (default: true)"); struct scst_dev_type scst_null_devtype = { .name = "none", diff --git a/scst/src/scst_tg.c b/scst/src/scst_tg.c index ca25b7a85..a92fc8c37 100644 --- a/scst/src/scst_tg.c +++ b/scst/src/scst_tg.c @@ -53,7 +53,7 @@ static LIST_HEAD(scst_dev_group_list); static bool alua_invariant_check; module_param(alua_invariant_check, bool, 0644); MODULE_PARM_DESC(alua_invariant_check, - "Enables a run-time ALUA state invariant check."); + "Enables a run-time ALUA state invariant check. (default: false)"); /* Global SCST ALUA lock/unlock functions (scst_dg_mutex) */ void scst_alua_lock(void)