diff options
author | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-11-27 16:59:20 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2014-12-02 00:35:22 -0500 |
commit | 73112edca9be1d7c37d0b94348c82c3742c3ef58 (patch) | |
tree | c40004c13e5e3b107d491a909a543461c65f6197 /include/target | |
parent | 2ed37f6c9b69092afbbf2a990336f8cbd303947d (diff) |
target: Move dev_cit to struct se_subsystem_api
This patch adds initial support for dev_cit as external config_item_type.
This includes a new struct target_backend_cits to hold the external CITs
within struct se_subsystem_api, and target_core_setup_sub_cits() to be
used by backend drivers ahead of transport_subsystem_register().
It adds a TB_CIT_SETUP() helper following target_core_fabric_configfs.c
to perform the config_item_type assignments.
Also, drop left-over target_core_dev_cit from target_core_configfs.c code
and update comments.
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include/target')
-rw-r--r-- | include/target/target_core_backend.h | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/include/target/target_core_backend.h b/include/target/target_core_backend.h index 9adc1bca1178..7b84436541b4 100644 --- a/include/target/target_core_backend.h +++ b/include/target/target_core_backend.h | |||
@@ -5,6 +5,10 @@ | |||
5 | #define TRANSPORT_PLUGIN_VHBA_PDEV 2 | 5 | #define TRANSPORT_PLUGIN_VHBA_PDEV 2 |
6 | #define TRANSPORT_PLUGIN_VHBA_VDEV 3 | 6 | #define TRANSPORT_PLUGIN_VHBA_VDEV 3 |
7 | 7 | ||
8 | struct target_backend_cits { | ||
9 | struct config_item_type tb_dev_cit; | ||
10 | }; | ||
11 | |||
8 | struct se_subsystem_api { | 12 | struct se_subsystem_api { |
9 | struct list_head sub_api_list; | 13 | struct list_head sub_api_list; |
10 | 14 | ||
@@ -44,6 +48,8 @@ struct se_subsystem_api { | |||
44 | int (*init_prot)(struct se_device *); | 48 | int (*init_prot)(struct se_device *); |
45 | int (*format_prot)(struct se_device *); | 49 | int (*format_prot)(struct se_device *); |
46 | void (*free_prot)(struct se_device *); | 50 | void (*free_prot)(struct se_device *); |
51 | |||
52 | struct target_backend_cits tb_cits; | ||
47 | }; | 53 | }; |
48 | 54 | ||
49 | struct sbc_ops { | 55 | struct sbc_ops { |
@@ -96,4 +102,7 @@ sense_reason_t transport_generic_map_mem_to_cmd(struct se_cmd *, | |||
96 | 102 | ||
97 | void array_free(void *array, int n); | 103 | void array_free(void *array, int n); |
98 | 104 | ||
105 | /* From target_core_configfs.c to setup default backend config_item_types */ | ||
106 | void target_core_setup_sub_cits(struct se_subsystem_api *); | ||
107 | |||
99 | #endif /* TARGET_CORE_BACKEND_H */ | 108 | #endif /* TARGET_CORE_BACKEND_H */ |