diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-03-06 20:34:32 -0800 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2015-03-06 21:24:53 -0800 |
commit | f8e471f9eb9068bf5ac8c6a04da74329a442f75a (patch) | |
tree | 043f0d1b6029db33812fccfad085676806a96872 /include/target/target_core_fabric_configfs.h | |
parent | d4c5dcacfaffb7493d161d5cd0fbb7b1190b7bd5 (diff) | |
download | talos-op-linux-f8e471f9eb9068bf5ac8c6a04da74329a442f75a.tar.gz talos-op-linux-f8e471f9eb9068bf5ac8c6a04da74329a442f75a.zip |
target: Add target_show_dynamic_sessions attribute helper
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>
Diffstat (limited to 'include/target/target_core_fabric_configfs.h')
-rw-r--r-- | include/target/target_core_fabric_configfs.h | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/include/target/target_core_fabric_configfs.h b/include/target/target_core_fabric_configfs.h index b32a14905cfa..7a0649c09e79 100644 --- a/include/target/target_core_fabric_configfs.h +++ b/include/target/target_core_fabric_configfs.h @@ -90,6 +90,11 @@ static struct target_fabric_tpg_attribute _fabric##_tpg_##_name = \ _fabric##_tpg_store_##_name); +#define TF_TPG_BASE_ATTR_RO(_fabric, _name) \ +static struct target_fabric_tpg_attribute _fabric##_tpg_##_name = \ + __CONFIGFS_EATTR_RO(_name, \ + _fabric##_tpg_show_##_name); + CONFIGFS_EATTR_STRUCT(target_fabric_wwn, target_fabric_configfs); #define TF_WWN_ATTR(_fabric, _name, _mode) \ static struct target_fabric_wwn_attribute _fabric##_wwn_##_name = \ |