Skip to content

Commit

Permalink
tcm_qla2xxx: Expose per endpoint dynamic_sessions attribute
Browse files Browse the repository at this point in the history
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>
  • Loading branch information
Nicholas Bellinger committed Mar 7, 2015
1 parent d4ee46f commit d23dbaa
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions drivers/scsi/qla2xxx/tcm_qla2xxx.c
Original file line number Diff line number Diff line change
Expand Up @@ -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,
};

Expand Down

0 comments on commit d23dbaa

Please sign in to comment.