mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-21 12:41:26 +00:00
scst: add module parameter to control the copy manager auto assignment
Reported-By: Guru Prasad <gp22online@gmail.com> Suggested-By: Sebastian Herbszt <herbszt@gmx.de> git-svn-id: http://svn.code.sf.net/p/scst/svn/trunk@7174 d57e44dd-8a1f-0410-8b47-8ef2f437770f
This commit is contained in:
10
scst/README
10
scst/README
@@ -398,6 +398,16 @@ Module scst supports the following parameters:
|
||||
to be consumed by all SCSI commands of a device at any given time. By
|
||||
default, it is approximately 2/5 of scst_max_cmd_mem.
|
||||
|
||||
- auto_cm_assignment - enables the copy managers auto registration.
|
||||
If a device is not registered in the copy manager, it can not be
|
||||
source or target of EXTENDED COPY commands. Enabled by default.
|
||||
Disable, if you want to manually control the copy manager
|
||||
registration or need to change a device, e.g. a DM cache device, with
|
||||
SCST LUN on top of it to avoid extra reference the copy manager holds
|
||||
on this device. In the later case you can also remove this reference
|
||||
by manually deleting the corresponding copy manager LUN via sysfs interface
|
||||
(/sys/kernel/scst_tgt/targets/copy_manager/copy_manager_tgt/luns/mgmt).
|
||||
|
||||
|
||||
SCST sysfs interface
|
||||
--------------------
|
||||
|
||||
@@ -268,6 +268,16 @@ Module scst supports the following parameters:
|
||||
consumed by the SCST commands for data buffers at any given time. By
|
||||
default it is approximately TotalMem/4.
|
||||
|
||||
- auto_cm_assignment - enables the copy managers auto registration.
|
||||
If a device is not registered in the copy manager, it can not be
|
||||
source or target of EXTENDED COPY commands. Enabled by default.
|
||||
Disable, if you want to manually control the copy manager
|
||||
registration or need to change a device, e.g. a DM cache device, with
|
||||
SCST LUN on top of it to avoid extra reference the copy manager holds
|
||||
on this device. In the later case you can also remove this reference
|
||||
by manually deleting the corresponding copy manager LUN via sysfs interface
|
||||
(/sys/kernel/scst_tgt/targets/copy_manager/copy_manager_tgt/luns/mgmt).
|
||||
|
||||
|
||||
SCST sysfs interface
|
||||
--------------------
|
||||
|
||||
@@ -2709,7 +2709,7 @@ int scst_cm_on_dev_register(struct scst_device *dev)
|
||||
scst_assert_activity_suspended();
|
||||
lockdep_assert_held(&scst_mutex);
|
||||
|
||||
if (!dev->handler->auto_cm_assignment_possible)
|
||||
if (!scst_auto_cm_assignment || !dev->handler->auto_cm_assignment_possible)
|
||||
goto out;
|
||||
|
||||
res = scst_cm_dev_register(dev, SCST_MAX_LUN);
|
||||
|
||||
@@ -175,6 +175,7 @@ cpumask_t default_cpu_mask;
|
||||
static unsigned int scst_max_cmd_mem;
|
||||
unsigned int scst_max_dev_cmd_mem;
|
||||
int scst_forcibly_close_sessions;
|
||||
int scst_auto_cm_assignment = true;
|
||||
|
||||
module_param_named(scst_threads, scst_threads, int, S_IRUGO);
|
||||
MODULE_PARM_DESC(scst_threads, "SCSI target threads count");
|
||||
@@ -193,6 +194,9 @@ 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");
|
||||
|
||||
module_param_named(auto_cm_assignment, scst_auto_cm_assignment, int,
|
||||
S_IWUSR | S_IRUGO);
|
||||
MODULE_PARM_DESC(auto_cm_assignment, "Enables the copy managers auto registration");
|
||||
|
||||
struct scst_dev_type scst_null_devtype = {
|
||||
.name = "none",
|
||||
|
||||
@@ -151,6 +151,7 @@ extern int scst_threads;
|
||||
extern unsigned int scst_max_dev_cmd_mem;
|
||||
|
||||
extern int scst_forcibly_close_sessions;
|
||||
extern int scst_auto_cm_assignment;
|
||||
|
||||
extern mempool_t *scst_mgmt_mempool;
|
||||
extern mempool_t *scst_mgmt_stub_mempool;
|
||||
|
||||
Reference in New Issue
Block a user