diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-03-06 20:43:34 -0800 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-03-06 21:25:15 -0800 |
commit | d23dbaaaa454667ad6af6feb56f740a990d1295d (patch) | |
tree | e7dc688d10b5e9646d6a8066bd05ad4a5a3d6451 /drivers/scsi | |
parent | d4ee46ff8c8404d63779772e4ddb3553eaca26ae (diff) | |
download | blackbird-op-linux-d23dbaaaa454667ad6af6feb56f740a990d1295d.tar.gz blackbird-op-linux-d23dbaaaa454667ad6af6feb56f740a990d1295d.zip |
tcm_qla2xxx: Expose per endpoint dynamic_sessions attribute
This patch exposes a new ../qla2xxx*/$WWPN/$TPGT/dynamic_sessions
attribute to dump the currently active sessions by FC initiator WWPN
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/scsi')
-rw-r--r-- | drivers/scsi/qla2xxx/tcm_qla2xxx.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/scsi/qla2xxx/tcm_qla2xxx.c b/drivers/scsi/qla2xxx/tcm_qla2xxx.c index 99f43b7fc9ab..c4f66f5745a8 100644 --- a/drivers/scsi/qla2xxx/tcm_qla2xxx.c +++ b/drivers/scsi/qla2xxx/tcm_qla2xxx.c @@ -1082,8 +1082,18 @@ static ssize_t tcm_qla2xxx_tpg_store_enable( TF_TPG_BASE_ATTR(tcm_qla2xxx, enable, S_IRUGO | S_IWUSR); +static ssize_t tcm_qla2xxx_tpg_show_dynamic_sessions( + struct se_portal_group *se_tpg, + char *page) +{ + return target_show_dynamic_sessions(se_tpg, page); +} + +TF_TPG_BASE_ATTR_RO(tcm_qla2xxx, dynamic_sessions); + static struct configfs_attribute *tcm_qla2xxx_tpg_attrs[] = { &tcm_qla2xxx_tpg_enable.attr, + &tcm_qla2xxx_tpg_dynamic_sessions.attr, NULL, }; |