Path: blob/master/include/target/target_core_configfs.h
10814 views
#define TARGET_CORE_CONFIGFS_VERSION TARGET_CORE_MOD_VERSION12#define TARGET_CORE_CONFIG_ROOT "/sys/kernel/config"34#define TARGET_CORE_NAME_MAX_LEN 645#define TARGET_FABRIC_NAME_SIZE 3267extern struct target_fabric_configfs *target_fabric_configfs_init(8struct module *, const char *);9extern void target_fabric_configfs_free(struct target_fabric_configfs *);10extern int target_fabric_configfs_register(struct target_fabric_configfs *);11extern void target_fabric_configfs_deregister(struct target_fabric_configfs *);1213struct target_fabric_configfs_template {14struct config_item_type tfc_discovery_cit;15struct config_item_type tfc_wwn_cit;16struct config_item_type tfc_wwn_fabric_stats_cit;17struct config_item_type tfc_tpg_cit;18struct config_item_type tfc_tpg_base_cit;19struct config_item_type tfc_tpg_lun_cit;20struct config_item_type tfc_tpg_port_cit;21struct config_item_type tfc_tpg_port_stat_cit;22struct config_item_type tfc_tpg_np_cit;23struct config_item_type tfc_tpg_np_base_cit;24struct config_item_type tfc_tpg_attrib_cit;25struct config_item_type tfc_tpg_param_cit;26struct config_item_type tfc_tpg_nacl_cit;27struct config_item_type tfc_tpg_nacl_base_cit;28struct config_item_type tfc_tpg_nacl_attrib_cit;29struct config_item_type tfc_tpg_nacl_auth_cit;30struct config_item_type tfc_tpg_nacl_param_cit;31struct config_item_type tfc_tpg_nacl_stat_cit;32struct config_item_type tfc_tpg_mappedlun_cit;33struct config_item_type tfc_tpg_mappedlun_stat_cit;34};3536struct target_fabric_configfs {37char tf_name[TARGET_FABRIC_NAME_SIZE];38atomic_t tf_access_cnt;39struct list_head tf_list;40struct config_group tf_group;41struct config_group tf_disc_group;42struct config_group *tf_default_groups[2];43/* Pointer to fabric's config_item */44struct config_item *tf_fabric;45/* Passed from fabric modules */46struct config_item_type *tf_fabric_cit;47/* Pointer to target core subsystem */48struct configfs_subsystem *tf_subsys;49/* Pointer to fabric's struct module */50struct module *tf_module;51struct target_core_fabric_ops tf_ops;52struct target_fabric_configfs_template tf_cit_tmpl;53};5455#define TF_CIT_TMPL(tf) (&(tf)->tf_cit_tmpl)565758