diff options
Diffstat (limited to 'drivers/target/iscsi/iscsi_target_configfs.c')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_configfs.c | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c index 542641c504a..5201d5ef970 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c @@ -754,9 +754,33 @@ static ssize_t lio_target_nacl_store_cmdsn_depth( TF_NACL_BASE_ATTR(lio_target, cmdsn_depth, S_IRUGO | S_IWUSR); +static ssize_t lio_target_nacl_show_tag( + struct se_node_acl *se_nacl, + char *page) +{ + return snprintf(page, PAGE_SIZE, "%s", se_nacl->acl_tag); +} + +static ssize_t lio_target_nacl_store_tag( + struct se_node_acl *se_nacl, + const char *page, + size_t count) +{ + int ret; + + ret = core_tpg_set_initiator_node_tag(se_nacl->se_tpg, se_nacl, page); + + if (ret < 0) + return ret; + return count; +} + +TF_NACL_BASE_ATTR(lio_target, tag, S_IRUGO | S_IWUSR); + static struct configfs_attribute *lio_target_initiator_attrs[] = { &lio_target_nacl_info.attr, &lio_target_nacl_cmdsn_depth.attr, + &lio_target_nacl_tag.attr, NULL, }; |