Nicholas Bellinger | c66ac9d | 2010-12-17 11:11:26 -0800 | [diff] [blame] | 1 | #define TARGET_CORE_CONFIGFS_VERSION TARGET_CORE_MOD_VERSION |
| 2 | |
| 3 | #define TARGET_CORE_CONFIG_ROOT "/sys/kernel/config" |
| 4 | |
| 5 | #define TARGET_CORE_NAME_MAX_LEN 64 |
| 6 | #define TARGET_FABRIC_NAME_SIZE 32 |
| 7 | |
| 8 | extern struct target_fabric_configfs *target_fabric_configfs_init( |
| 9 | struct module *, const char *); |
| 10 | extern void target_fabric_configfs_free(struct target_fabric_configfs *); |
| 11 | extern int target_fabric_configfs_register(struct target_fabric_configfs *); |
| 12 | extern void target_fabric_configfs_deregister(struct target_fabric_configfs *); |
| 13 | |
| 14 | struct target_fabric_configfs_template { |
| 15 | struct config_item_type tfc_discovery_cit; |
| 16 | struct config_item_type tfc_wwn_cit; |
Nicholas Bellinger | 12d233842 | 2011-03-14 04:06:11 -0700 | [diff] [blame] | 17 | struct config_item_type tfc_wwn_fabric_stats_cit; |
Nicholas Bellinger | c66ac9d | 2010-12-17 11:11:26 -0800 | [diff] [blame] | 18 | struct config_item_type tfc_tpg_cit; |
| 19 | struct config_item_type tfc_tpg_base_cit; |
| 20 | struct config_item_type tfc_tpg_lun_cit; |
| 21 | struct config_item_type tfc_tpg_port_cit; |
Nicholas Bellinger | 12d233842 | 2011-03-14 04:06:11 -0700 | [diff] [blame] | 22 | struct config_item_type tfc_tpg_port_stat_cit; |
Nicholas Bellinger | c66ac9d | 2010-12-17 11:11:26 -0800 | [diff] [blame] | 23 | struct config_item_type tfc_tpg_np_cit; |
| 24 | struct config_item_type tfc_tpg_np_base_cit; |
| 25 | struct config_item_type tfc_tpg_attrib_cit; |
Nicholas Bellinger | e4b512e | 2013-06-19 18:37:00 -0700 | [diff] [blame] | 26 | struct config_item_type tfc_tpg_auth_cit; |
Nicholas Bellinger | c66ac9d | 2010-12-17 11:11:26 -0800 | [diff] [blame] | 27 | struct config_item_type tfc_tpg_param_cit; |
| 28 | struct config_item_type tfc_tpg_nacl_cit; |
| 29 | struct config_item_type tfc_tpg_nacl_base_cit; |
| 30 | struct config_item_type tfc_tpg_nacl_attrib_cit; |
| 31 | struct config_item_type tfc_tpg_nacl_auth_cit; |
| 32 | struct config_item_type tfc_tpg_nacl_param_cit; |
Nicholas Bellinger | 12d233842 | 2011-03-14 04:06:11 -0700 | [diff] [blame] | 33 | struct config_item_type tfc_tpg_nacl_stat_cit; |
Nicholas Bellinger | c66ac9d | 2010-12-17 11:11:26 -0800 | [diff] [blame] | 34 | struct config_item_type tfc_tpg_mappedlun_cit; |
Nicholas Bellinger | 12d233842 | 2011-03-14 04:06:11 -0700 | [diff] [blame] | 35 | struct config_item_type tfc_tpg_mappedlun_stat_cit; |
Nicholas Bellinger | c66ac9d | 2010-12-17 11:11:26 -0800 | [diff] [blame] | 36 | }; |
| 37 | |
| 38 | struct target_fabric_configfs { |
| 39 | char tf_name[TARGET_FABRIC_NAME_SIZE]; |
| 40 | atomic_t tf_access_cnt; |
| 41 | struct list_head tf_list; |
| 42 | struct config_group tf_group; |
| 43 | struct config_group tf_disc_group; |
| 44 | struct config_group *tf_default_groups[2]; |
| 45 | /* Pointer to fabric's config_item */ |
| 46 | struct config_item *tf_fabric; |
| 47 | /* Passed from fabric modules */ |
| 48 | struct config_item_type *tf_fabric_cit; |
| 49 | /* Pointer to target core subsystem */ |
| 50 | struct configfs_subsystem *tf_subsys; |
| 51 | /* Pointer to fabric's struct module */ |
| 52 | struct module *tf_module; |
| 53 | struct target_core_fabric_ops tf_ops; |
| 54 | struct target_fabric_configfs_template tf_cit_tmpl; |
| 55 | }; |
| 56 | |