mirror of
https://github.com/SCST-project/scst.git
synced 2026-05-19 03:31:26 +00:00
Merge branch 'svn-trunk'
This commit is contained in:
@@ -2559,14 +2559,14 @@ static int scst_cm_dev_register(struct scst_device *dev, uint64_t lun)
|
||||
|
||||
TRACE_DBG("dev %s, LUN %ld", dev->virt_name, (unsigned long)lun);
|
||||
|
||||
if (scst_cm_get_lun(dev) != SCST_MAX_LUN) {
|
||||
TRACE_DBG("Copy Manager already registered device %s",
|
||||
dev->virt_name);
|
||||
res = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
if (lun == SCST_MAX_LUN) {
|
||||
if (scst_cm_get_lun(dev) != SCST_MAX_LUN) {
|
||||
TRACE_DBG("Copy Manager already registered device %s",
|
||||
dev->virt_name);
|
||||
res = 0;
|
||||
goto out;
|
||||
}
|
||||
|
||||
add_lun = true;
|
||||
while (1) {
|
||||
lun = scst_cm_next_lun++;
|
||||
|
||||
@@ -4541,12 +4541,6 @@ int scst_acg_add_lun(struct scst_acg *acg, struct kobject *parent,
|
||||
list_add_tail(&acg_dev->acg_dev_list_entry, &acg->acg_dev_list);
|
||||
list_add_tail(&acg_dev->dev_acg_dev_list_entry, &dev->dev_acg_dev_list);
|
||||
|
||||
if (!(flags & SCST_ADD_LUN_CM)) {
|
||||
res = scst_cm_on_add_lun(acg_dev, lun, &flags);
|
||||
if (res != 0)
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
list_for_each_entry(sess, &acg->acg_sess_list, acg_sess_list_entry) {
|
||||
res = scst_alloc_add_tgt_dev(sess, acg_dev, &tgt_dev);
|
||||
if (res == -EPERM)
|
||||
@@ -4558,6 +4552,12 @@ int scst_acg_add_lun(struct scst_acg *acg, struct kobject *parent,
|
||||
&tmp_tgt_dev_list);
|
||||
}
|
||||
|
||||
if (!(flags & SCST_ADD_LUN_CM)) {
|
||||
res = scst_cm_on_add_lun(acg_dev, lun, &flags);
|
||||
if (res != 0)
|
||||
goto out_free;
|
||||
}
|
||||
|
||||
res = scst_acg_dev_sysfs_create(acg_dev, parent);
|
||||
if (res != 0)
|
||||
goto out_on_del;
|
||||
|
||||
Reference in New Issue
Block a user