From 0fc2b0ad6d4b82e7409fde5a0c7cc9072ac08088 Mon Sep 17 00:00:00 2001 From: vlnb Date: Fri, 8 May 2009 10:35:24 +0000 Subject: [PATCH 1/1] Patch from frank zago with some modifications. It exposes scst parameters scst_max_cmd_mem and scst_max_dev_cmd_mem as well as vdisk's parameters num_threads and scst_vdisk_ID visible through /sys/module/scst and /sys/module/scst_vdisk correspondingly. git-svn-id: https://scst.svn.sourceforge.net/svnroot/scst/trunk@827 d57e44dd-8a1f-0410-8b47-8ef2f437770f --- scst/src/dev_handlers/scst_vdisk.c | 4 ++-- scst/src/scst_main.c | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/scst/src/dev_handlers/scst_vdisk.c b/scst/src/dev_handlers/scst_vdisk.c index 654372d..3a363b2 100644 --- a/scst/src/dev_handlers/scst_vdisk.c +++ b/scst/src/dev_handlers/scst_vdisk.c @@ -235,7 +235,7 @@ static struct kmem_cache *blockio_work_cachep; #define DEF_NUM_THREADS 5 static int num_threads = DEF_NUM_THREADS; -module_param_named(num_threads, num_threads, int, 0); +module_param_named(num_threads, num_threads, int, S_IRUGO); MODULE_PARM_DESC(num_threads, "vdisk threads count"); static int vdisk_attach(struct scst_device *dev); @@ -375,7 +375,7 @@ static char *vcdrom_proc_help_string = static int scst_vdisk_ID; -module_param_named(scst_vdisk_ID, scst_vdisk_ID, int, 0); +module_param_named(scst_vdisk_ID, scst_vdisk_ID, int, S_IRUGO); MODULE_PARM_DESC(scst_vdisk_ID, "SCST virtual disk subsystem ID"); diff --git a/scst/src/scst_main.c b/scst/src/scst_main.c index 40cb9ec..c29cbc6 100644 --- a/scst/src/scst_main.c +++ b/scst/src/scst_main.c @@ -146,11 +146,11 @@ unsigned int scst_max_dev_cmd_mem; module_param_named(scst_threads, scst_threads, int, 0); MODULE_PARM_DESC(scst_threads, "SCSI target threads count"); -module_param_named(scst_max_cmd_mem, scst_max_cmd_mem, int, 0); +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"); -module_param_named(scst_max_dev_cmd_mem, scst_max_dev_cmd_mem, int, 0); +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"); -- 2.17.1