From 30c7ca9350048486ab32fdb9f5f6ed0603bba39a Mon Sep 17 00:00:00 2001 From: David Disseldorp Date: Fri, 23 Nov 2018 18:36:12 +0100 Subject: scsi: target: drop unnecessary get_fabric_name() accessor from fabric_ops All fabrics return a const string. In all cases *except* iSCSI the get_fabric_name() string matches fabric_ops.name. Both fabric_ops.get_fabric_name() and fabric_ops.name are user-facing, with the former being used for PR/ALUA state and the latter for ConfigFS (config/target/$name), so we unfortunately need to keep both strings around for now. Replace the useless .get_fabric_name() accessor function with a const string fabric_name member variable. Signed-off-by: David Disseldorp Reviewed-by: Christoph Hellwig Signed-off-by: Martin K. Petersen --- include/target/target_core_fabric.h | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'include/target') diff --git a/include/target/target_core_fabric.h b/include/target/target_core_fabric.h index f4147b398431..a0b41110d266 100644 --- a/include/target/target_core_fabric.h +++ b/include/target/target_core_fabric.h @@ -9,6 +9,11 @@ struct target_core_fabric_ops { struct module *module; const char *name; + /* + * fabric_name is used for the ALUA state path and is stored on disk + * with PR state. + */ + const char *fabric_name; size_t node_acl_size; /* * Limits number of scatterlist entries per SCF_SCSI_DATA_CDB payload. @@ -23,7 +28,6 @@ struct target_core_fabric_ops { * XXX: Currently assumes single PAGE_SIZE per scatterlist entry */ u32 max_data_sg_nents; - char *(*get_fabric_name)(void); char *(*tpg_get_wwn)(struct se_portal_group *); u16 (*tpg_get_tag)(struct se_portal_group *); u32 (*tpg_get_default_depth)(struct se_portal_group *); -- cgit v1.2.3