summaryrefslogtreecommitdiffstats
path: root/drivers/target/iscsi/iscsi_target_configfs.c
diff options
context:
space:
mode:
authorNicholas Bellinger <nab@linux-iscsi.org>2013-11-20 11:57:18 -0800
committerNicholas Bellinger <nab@linux-iscsi.org>2013-11-20 11:57:18 -0800
commitd1fa7a1d506730a5d1211048c2fdacc42373d4d5 (patch)
treed3105e04c7134c5e1a982cad8e185c3ffce15d11 /drivers/target/iscsi/iscsi_target_configfs.c
parentb0a382c58ef5c12804cda4268d7e62bef978789d (diff)
iscsi-target: Expose default_erl as TPG attribute
This patch exposes default_erl as a TPG attribute so that it may be set TPG wide in demo-mode, but still allow the existing NodeACL attribute to be overridden on a per initiator basis. Reported-by: Arshad Hussain <arshad.hussain@calsoftinc.com> Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_configfs.c')
-rw-r--r--drivers/target/iscsi/iscsi_target_configfs.c11
1 files changed, 10 insertions, 1 deletions
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c
index fde3624dce7..e3318edb233 100644
--- a/drivers/target/iscsi/iscsi_target_configfs.c
+++ b/drivers/target/iscsi/iscsi_target_configfs.c
@@ -1046,6 +1046,11 @@ TPG_ATTR(prod_mode_write_protect, S_IRUGO | S_IWUSR);
*/
DEF_TPG_ATTRIB(demo_mode_discovery);
TPG_ATTR(demo_mode_discovery, S_IRUGO | S_IWUSR);
+/*
+ * Define iscsi_tpg_attrib_s_default_erl
+ */
+DEF_TPG_ATTRIB(default_erl);
+TPG_ATTR(default_erl, S_IRUGO | S_IWUSR);
static struct configfs_attribute *lio_target_tpg_attrib_attrs[] = {
&iscsi_tpg_attrib_authentication.attr,
@@ -1057,6 +1062,7 @@ static struct configfs_attribute *lio_target_tpg_attrib_attrs[] = {
&iscsi_tpg_attrib_demo_mode_write_protect.attr,
&iscsi_tpg_attrib_prod_mode_write_protect.attr,
&iscsi_tpg_attrib_demo_mode_discovery.attr,
+ &iscsi_tpg_attrib_default_erl.attr,
NULL,
};
@@ -1919,9 +1925,12 @@ static void lio_set_default_node_attributes(struct se_node_acl *se_acl)
{
struct iscsi_node_acl *acl = container_of(se_acl, struct iscsi_node_acl,
se_node_acl);
+ struct se_portal_group *se_tpg = se_acl->se_tpg;
+ struct iscsi_portal_group *tpg = container_of(se_tpg,
+ struct iscsi_portal_group, tpg_se_tpg);
acl->node_attrib.nacl = acl;
- iscsit_set_default_node_attribues(acl);
+ iscsit_set_default_node_attribues(acl, tpg);
}
static int lio_check_stop_free(struct se_cmd *se_cmd)