diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-03-06 23:40:57 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-03-07 00:25:13 -0500 |
commit | d4ee46ff8c8404d63779772e4ddb3553eaca26ae (patch) | |
tree | 2fba4824b11fb17b09b523ed7c06b9827dfe6d55 /drivers/target | |
parent | f8e471f9eb9068bf5ac8c6a04da74329a442f75a (diff) |
iscsi-target: Expose per endpoint dynamic_sessions attribute
This patch exposes a new ../iscsi/$IQN/$TPGT/dynamic_sessions attribute
to dump the currently active sessions by iSCSI InitiatorName that have
been created with dynamically generated se_node_acls.
This information is useful so that user-space can optionally perform
dynamic -> explicit NodeACL conversion based on $INITIATOR_WWPN.
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'drivers/target')
-rw-r--r-- | drivers/target/iscsi/iscsi_target_configfs.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/target/iscsi/iscsi_target_configfs.c b/drivers/target/iscsi/iscsi_target_configfs.c index 48384b675e62..95a67f604073 100644 --- a/drivers/target/iscsi/iscsi_target_configfs.c +++ b/drivers/target/iscsi/iscsi_target_configfs.c | |||
@@ -1410,8 +1410,18 @@ out: | |||
1410 | 1410 | ||
1411 | TF_TPG_BASE_ATTR(lio_target, enable, S_IRUGO | S_IWUSR); | 1411 | TF_TPG_BASE_ATTR(lio_target, enable, S_IRUGO | S_IWUSR); |
1412 | 1412 | ||
1413 | static ssize_t lio_target_tpg_show_dynamic_sessions( | ||
1414 | struct se_portal_group *se_tpg, | ||
1415 | char *page) | ||
1416 | { | ||
1417 | return target_show_dynamic_sessions(se_tpg, page); | ||
1418 | } | ||
1419 | |||
1420 | TF_TPG_BASE_ATTR_RO(lio_target, dynamic_sessions); | ||
1421 | |||
1413 | static struct configfs_attribute *lio_target_tpg_attrs[] = { | 1422 | static struct configfs_attribute *lio_target_tpg_attrs[] = { |
1414 | &lio_target_tpg_enable.attr, | 1423 | &lio_target_tpg_enable.attr, |
1424 | &lio_target_tpg_dynamic_sessions.attr, | ||
1415 | NULL, | 1425 | NULL, |
1416 | }; | 1426 | }; |
1417 | 1427 | ||