target: Add target_show_dynamic_sessions attribute helper
authorNicholas Bellinger <nab@linux-iscsi.org>
Sat, 7 Mar 2015 04:34:32 +0000 (20:34 -0800)
committerNicholas Bellinger <nab@linux-iscsi.org>
Sat, 7 Mar 2015 05:24:53 +0000 (21:24 -0800)
This patch adds a new helper function that can be used by fabric driver
TPG attributes for dumping the list of active sessions with a dynamically
generated se_node_acl. (generate_node_acl=1).

It prints one se_node_acl->initiatorname per line, up to PAGE_SIZE which
is due to the current limitiation of single page attribute output within
sysfs and configfs code.

Note that if a session is referencing a explicit NodeACL, the InitiatorName
will not appear within dynamic_sessions output.

Reported-by: Andy Grover <agrover@redhat.com>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
drivers/target/target_core_transport.c
include/target/target_core_fabric.h
include/target/target_core_fabric_configfs.h

Simple merge