diff options
author | Christoph Hellwig <hch@infradead.org> | 2011-11-14 12:30:30 -0500 |
---|---|---|
committer | Nicholas Bellinger <nab@linux-iscsi.org> | 2011-12-14 03:51:12 -0500 |
commit | e26d99aed42ec6cdc9540d19c77ac5d4dd2c5b00 (patch) | |
tree | 9c0424f81877d6c5cfaf7746447e0c9decf8e82e /include | |
parent | dc47ce90c3a822cd7c9e9339fe4d5f61dcb26b50 (diff) |
target: reshuffle headers
Create a new headers, drivers/target/target_core_internal.h that is supposed
to hold all target_core-internal prototypes. Move all non-exported includes
from include/target to it, and merge the smaller prototype-only includes
inside drivers/target into it as well. Mark functions that were found to
not be called outside their implementation file static.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas Bellinger <nab@linux-iscsi.org>
Diffstat (limited to 'include')
-rw-r--r-- | include/target/target_core_device.h | 58 | ||||
-rw-r--r-- | include/target/target_core_tmr.h | 4 | ||||
-rw-r--r-- | include/target/target_core_tpg.h | 13 | ||||
-rw-r--r-- | include/target/target_core_transport.h | 35 |
4 files changed, 4 insertions, 106 deletions
diff --git a/include/target/target_core_device.h b/include/target/target_core_device.h index 2be31ff8763b..c6123a49014d 100644 --- a/include/target/target_core_device.h +++ b/include/target/target_core_device.h | |||
@@ -1,63 +1,9 @@ | |||
1 | #ifndef TARGET_CORE_DEVICE_H | 1 | #ifndef TARGET_CORE_DEVICE_H |
2 | #define TARGET_CORE_DEVICE_H | 2 | #define TARGET_CORE_DEVICE_H |
3 | 3 | ||
4 | |||
5 | // external | ||
4 | extern int transport_lookup_cmd_lun(struct se_cmd *, u32); | 6 | extern int transport_lookup_cmd_lun(struct se_cmd *, u32); |
5 | extern int transport_lookup_tmr_lun(struct se_cmd *, u32); | 7 | extern int transport_lookup_tmr_lun(struct se_cmd *, u32); |
6 | extern struct se_dev_entry *core_get_se_deve_from_rtpi( | ||
7 | struct se_node_acl *, u16); | ||
8 | extern int core_free_device_list_for_node(struct se_node_acl *, | ||
9 | struct se_portal_group *); | ||
10 | extern void core_dec_lacl_count(struct se_node_acl *, struct se_cmd *); | ||
11 | extern void core_update_device_list_access(u32, u32, struct se_node_acl *); | ||
12 | extern int core_update_device_list_for_node(struct se_lun *, struct se_lun_acl *, u32, | ||
13 | u32, struct se_node_acl *, | ||
14 | struct se_portal_group *, int); | ||
15 | extern void core_clear_lun_from_tpg(struct se_lun *, struct se_portal_group *); | ||
16 | extern int core_dev_export(struct se_device *, struct se_portal_group *, | ||
17 | struct se_lun *); | ||
18 | extern void core_dev_unexport(struct se_device *, struct se_portal_group *, | ||
19 | struct se_lun *); | ||
20 | extern int target_report_luns(struct se_task *); | ||
21 | extern void se_release_device_for_hba(struct se_device *); | ||
22 | extern void se_release_vpd_for_dev(struct se_device *); | ||
23 | extern void se_clear_dev_ports(struct se_device *); | ||
24 | extern int se_free_virtual_device(struct se_device *, struct se_hba *); | ||
25 | extern int se_dev_check_online(struct se_device *); | ||
26 | extern int se_dev_check_shutdown(struct se_device *); | ||
27 | extern void se_dev_set_default_attribs(struct se_device *, struct se_dev_limits *); | ||
28 | extern int se_dev_set_task_timeout(struct se_device *, u32); | ||
29 | extern int se_dev_set_max_unmap_lba_count(struct se_device *, u32); | ||
30 | extern int se_dev_set_max_unmap_block_desc_count(struct se_device *, u32); | ||
31 | extern int se_dev_set_unmap_granularity(struct se_device *, u32); | ||
32 | extern int se_dev_set_unmap_granularity_alignment(struct se_device *, u32); | ||
33 | extern int se_dev_set_emulate_dpo(struct se_device *, int); | ||
34 | extern int se_dev_set_emulate_fua_write(struct se_device *, int); | ||
35 | extern int se_dev_set_emulate_fua_read(struct se_device *, int); | ||
36 | extern int se_dev_set_emulate_write_cache(struct se_device *, int); | ||
37 | extern int se_dev_set_emulate_ua_intlck_ctrl(struct se_device *, int); | ||
38 | extern int se_dev_set_emulate_tas(struct se_device *, int); | ||
39 | extern int se_dev_set_emulate_tpu(struct se_device *, int); | ||
40 | extern int se_dev_set_emulate_tpws(struct se_device *, int); | ||
41 | extern int se_dev_set_enforce_pr_isids(struct se_device *, int); | ||
42 | extern int se_dev_set_is_nonrot(struct se_device *, int); | ||
43 | extern int se_dev_set_emulate_rest_reord(struct se_device *dev, int); | ||
44 | extern int se_dev_set_queue_depth(struct se_device *, u32); | ||
45 | extern int se_dev_set_max_sectors(struct se_device *, u32); | ||
46 | extern int se_dev_set_optimal_sectors(struct se_device *, u32); | ||
47 | extern int se_dev_set_block_size(struct se_device *, u32); | ||
48 | extern struct se_lun *core_dev_add_lun(struct se_portal_group *, struct se_hba *, | ||
49 | struct se_device *, u32); | ||
50 | extern int core_dev_del_lun(struct se_portal_group *, u32); | ||
51 | extern struct se_lun *core_get_lun_from_tpg(struct se_portal_group *, u32); | ||
52 | extern struct se_lun_acl *core_dev_init_initiator_node_lun_acl(struct se_portal_group *, | ||
53 | u32, char *, int *); | ||
54 | extern int core_dev_add_initiator_node_lun_acl(struct se_portal_group *, | ||
55 | struct se_lun_acl *, u32, u32); | ||
56 | extern int core_dev_del_initiator_node_lun_acl(struct se_portal_group *, | ||
57 | struct se_lun *, struct se_lun_acl *); | ||
58 | extern void core_dev_free_initiator_node_lun_acl(struct se_portal_group *, | ||
59 | struct se_lun_acl *lacl); | ||
60 | extern int core_dev_setup_virtual_lun0(void); | ||
61 | extern void core_dev_release_virtual_lun0(void); | ||
62 | 8 | ||
63 | #endif /* TARGET_CORE_DEVICE_H */ | 9 | #endif /* TARGET_CORE_DEVICE_H */ |
diff --git a/include/target/target_core_tmr.h b/include/target/target_core_tmr.h index d5876e17d3fb..36b3e0de99b4 100644 --- a/include/target/target_core_tmr.h +++ b/include/target/target_core_tmr.h | |||
@@ -25,11 +25,7 @@ enum tcm_tmrsp_table { | |||
25 | TMR_FUNCTION_REJECTED = 255, | 25 | TMR_FUNCTION_REJECTED = 255, |
26 | }; | 26 | }; |
27 | 27 | ||
28 | extern struct kmem_cache *se_tmr_req_cache; | ||
29 | |||
30 | extern struct se_tmr_req *core_tmr_alloc_req(struct se_cmd *, void *, u8, gfp_t); | 28 | extern struct se_tmr_req *core_tmr_alloc_req(struct se_cmd *, void *, u8, gfp_t); |
31 | extern void core_tmr_release_req(struct se_tmr_req *); | 29 | extern void core_tmr_release_req(struct se_tmr_req *); |
32 | extern int core_tmr_lun_reset(struct se_device *, struct se_tmr_req *, | ||
33 | struct list_head *, struct se_cmd *); | ||
34 | 30 | ||
35 | #endif /* TARGET_CORE_TMR_H */ | 31 | #endif /* TARGET_CORE_TMR_H */ |
diff --git a/include/target/target_core_tpg.h b/include/target/target_core_tpg.h index 77e18729c4c1..80ae59fdada3 100644 --- a/include/target/target_core_tpg.h +++ b/include/target/target_core_tpg.h | |||
@@ -1,17 +1,9 @@ | |||
1 | #ifndef TARGET_CORE_TPG_H | 1 | #ifndef TARGET_CORE_TPG_H |
2 | #define TARGET_CORE_TPG_H | 2 | #define TARGET_CORE_TPG_H |
3 | 3 | ||
4 | extern struct se_node_acl *__core_tpg_get_initiator_node_acl(struct se_portal_group *tpg, | ||
5 | const char *); | ||
6 | extern struct se_node_acl *core_tpg_get_initiator_node_acl(struct se_portal_group *tpg, | ||
7 | unsigned char *); | ||
8 | extern void core_tpg_add_node_to_devs(struct se_node_acl *, | ||
9 | struct se_portal_group *); | ||
10 | extern struct se_node_acl *core_tpg_check_initiator_node_acl( | 4 | extern struct se_node_acl *core_tpg_check_initiator_node_acl( |
11 | struct se_portal_group *, | 5 | struct se_portal_group *, |
12 | unsigned char *); | 6 | unsigned char *); |
13 | extern void core_tpg_wait_for_nacl_pr_ref(struct se_node_acl *); | ||
14 | extern void core_tpg_wait_for_mib_ref(struct se_node_acl *); | ||
15 | extern void core_tpg_clear_object_luns(struct se_portal_group *); | 7 | extern void core_tpg_clear_object_luns(struct se_portal_group *); |
16 | extern struct se_node_acl *core_tpg_add_initiator_node_acl( | 8 | extern struct se_node_acl *core_tpg_add_initiator_node_acl( |
17 | struct se_portal_group *, | 9 | struct se_portal_group *, |
@@ -26,10 +18,5 @@ extern int core_tpg_register(struct target_core_fabric_ops *, | |||
26 | struct se_portal_group *, void *, | 18 | struct se_portal_group *, void *, |
27 | int); | 19 | int); |
28 | extern int core_tpg_deregister(struct se_portal_group *); | 20 | extern int core_tpg_deregister(struct se_portal_group *); |
29 | extern struct se_lun *core_tpg_pre_addlun(struct se_portal_group *, u32); | ||
30 | extern int core_tpg_post_addlun(struct se_portal_group *, struct se_lun *, u32, | ||
31 | void *); | ||
32 | extern struct se_lun *core_tpg_pre_dellun(struct se_portal_group *, u32, int *); | ||
33 | extern int core_tpg_post_dellun(struct se_portal_group *, struct se_lun *); | ||
34 | 21 | ||
35 | #endif /* TARGET_CORE_TPG_H */ | 22 | #endif /* TARGET_CORE_TPG_H */ |
diff --git a/include/target/target_core_transport.h b/include/target/target_core_transport.h index dac4f2d859fd..68fe1f2c081c 100644 --- a/include/target/target_core_transport.h +++ b/include/target/target_core_transport.h | |||
@@ -76,14 +76,8 @@ | |||
76 | 76 | ||
77 | struct se_subsystem_api; | 77 | struct se_subsystem_api; |
78 | 78 | ||
79 | extern int init_se_kmem_caches(void); | ||
80 | extern void release_se_kmem_caches(void); | ||
81 | extern u32 scsi_get_new_index(scsi_index_t); | ||
82 | extern void transport_init_queue_obj(struct se_queue_obj *); | ||
83 | extern void transport_subsystem_check_init(void); | ||
84 | extern int transport_subsystem_register(struct se_subsystem_api *); | 79 | extern int transport_subsystem_register(struct se_subsystem_api *); |
85 | extern void transport_subsystem_release(struct se_subsystem_api *); | 80 | extern void transport_subsystem_release(struct se_subsystem_api *); |
86 | extern void transport_load_plugins(void); | ||
87 | extern struct se_session *transport_init_session(void); | 81 | extern struct se_session *transport_init_session(void); |
88 | extern void __transport_register_session(struct se_portal_group *, | 82 | extern void __transport_register_session(struct se_portal_group *, |
89 | struct se_node_acl *, | 83 | struct se_node_acl *, |
@@ -94,32 +88,14 @@ extern void transport_register_session(struct se_portal_group *, | |||
94 | extern void transport_free_session(struct se_session *); | 88 | extern void transport_free_session(struct se_session *); |
95 | extern void transport_deregister_session_configfs(struct se_session *); | 89 | extern void transport_deregister_session_configfs(struct se_session *); |
96 | extern void transport_deregister_session(struct se_session *); | 90 | extern void transport_deregister_session(struct se_session *); |
97 | extern void transport_cmd_finish_abort(struct se_cmd *, int); | ||
98 | extern void transport_complete_sync_cache(struct se_cmd *, int); | 91 | extern void transport_complete_sync_cache(struct se_cmd *, int); |
99 | extern void transport_complete_task(struct se_task *, int); | 92 | extern void transport_complete_task(struct se_task *, int); |
100 | extern void transport_add_task_to_execute_queue(struct se_task *, | 93 | |
101 | struct se_task *, | ||
102 | struct se_device *); | ||
103 | extern void transport_remove_task_from_execute_queue(struct se_task *, | ||
104 | struct se_device *); | ||
105 | extern void __transport_remove_task_from_execute_queue(struct se_task *, | ||
106 | struct se_device *); | ||
107 | unsigned char *transport_dump_cmd_direction(struct se_cmd *); | ||
108 | extern void transport_dump_dev_state(struct se_device *, char *, int *); | ||
109 | extern void transport_dump_dev_info(struct se_device *, struct se_lun *, | ||
110 | unsigned long long, char *, int *); | ||
111 | extern void transport_dump_vpd_proto_id(struct t10_vpd *, | ||
112 | unsigned char *, int); | ||
113 | extern void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); | 94 | extern void transport_set_vpd_proto_id(struct t10_vpd *, unsigned char *); |
114 | extern int transport_dump_vpd_assoc(struct t10_vpd *, | ||
115 | unsigned char *, int); | ||
116 | extern int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); | 95 | extern int transport_set_vpd_assoc(struct t10_vpd *, unsigned char *); |
117 | extern int transport_dump_vpd_ident_type(struct t10_vpd *, | ||
118 | unsigned char *, int); | ||
119 | extern int transport_set_vpd_ident_type(struct t10_vpd *, unsigned char *); | 96 | extern int transport_set_vpd_ident_type(struct t10_vpd *, unsigned char *); |
120 | extern int transport_dump_vpd_ident(struct t10_vpd *, | ||
121 | unsigned char *, int); | ||
122 | extern int transport_set_vpd_ident(struct t10_vpd *, unsigned char *); | 97 | extern int transport_set_vpd_ident(struct t10_vpd *, unsigned char *); |
98 | |||
123 | extern struct se_device *transport_add_device_to_core_hba(struct se_hba *, | 99 | extern struct se_device *transport_add_device_to_core_hba(struct se_hba *, |
124 | struct se_subsystem_api *, | 100 | struct se_subsystem_api *, |
125 | struct se_subsystem_dev *, u32, | 101 | struct se_subsystem_dev *, u32, |
@@ -136,29 +112,22 @@ extern int transport_handle_cdb_direct(struct se_cmd *); | |||
136 | extern int transport_generic_handle_cdb_map(struct se_cmd *); | 112 | extern int transport_generic_handle_cdb_map(struct se_cmd *); |
137 | extern int transport_generic_handle_data(struct se_cmd *); | 113 | extern int transport_generic_handle_data(struct se_cmd *); |
138 | extern int transport_generic_handle_tmr(struct se_cmd *); | 114 | extern int transport_generic_handle_tmr(struct se_cmd *); |
139 | extern bool target_stop_task(struct se_task *task, unsigned long *flags); | ||
140 | extern int transport_generic_map_mem_to_cmd(struct se_cmd *cmd, struct scatterlist *, u32, | 115 | extern int transport_generic_map_mem_to_cmd(struct se_cmd *cmd, struct scatterlist *, u32, |
141 | struct scatterlist *, u32); | 116 | struct scatterlist *, u32); |
142 | extern int transport_clear_lun_from_sessions(struct se_lun *); | ||
143 | extern bool transport_wait_for_tasks(struct se_cmd *); | 117 | extern bool transport_wait_for_tasks(struct se_cmd *); |
144 | extern int transport_check_aborted_status(struct se_cmd *, int); | 118 | extern int transport_check_aborted_status(struct se_cmd *, int); |
145 | extern int transport_send_check_condition_and_sense(struct se_cmd *, u8, int); | 119 | extern int transport_send_check_condition_and_sense(struct se_cmd *, u8, int); |
146 | extern void transport_send_task_abort(struct se_cmd *); | ||
147 | extern void transport_release_cmd(struct se_cmd *); | ||
148 | extern void transport_generic_free_cmd(struct se_cmd *, int); | 120 | extern void transport_generic_free_cmd(struct se_cmd *, int); |
149 | extern void target_get_sess_cmd(struct se_session *, struct se_cmd *); | 121 | extern void target_get_sess_cmd(struct se_session *, struct se_cmd *); |
150 | extern int target_put_sess_cmd(struct se_session *, struct se_cmd *); | 122 | extern int target_put_sess_cmd(struct se_session *, struct se_cmd *); |
151 | extern void target_splice_sess_cmd_list(struct se_session *); | 123 | extern void target_splice_sess_cmd_list(struct se_session *); |
152 | extern void target_wait_for_sess_cmds(struct se_session *, int); | 124 | extern void target_wait_for_sess_cmds(struct se_session *, int); |
153 | extern void transport_generic_wait_for_cmds(struct se_cmd *, int); | ||
154 | extern void transport_do_task_sg_chain(struct se_cmd *); | 125 | extern void transport_do_task_sg_chain(struct se_cmd *); |
155 | extern void transport_generic_process_write(struct se_cmd *); | 126 | extern void transport_generic_process_write(struct se_cmd *); |
156 | extern int transport_generic_new_cmd(struct se_cmd *); | 127 | extern int transport_generic_new_cmd(struct se_cmd *); |
157 | extern int transport_generic_do_tmr(struct se_cmd *); | ||
158 | /* From target_core_alua.c */ | 128 | /* From target_core_alua.c */ |
159 | extern int core_alua_check_nonop_delay(struct se_cmd *); | 129 | extern int core_alua_check_nonop_delay(struct se_cmd *); |
160 | /* From target_core_cdb.c */ | 130 | /* From target_core_cdb.c */ |
161 | extern int transport_emulate_control_cdb(struct se_task *); | ||
162 | extern void target_get_task_cdb(struct se_task *task, unsigned char *cdb); | 131 | extern void target_get_task_cdb(struct se_task *task, unsigned char *cdb); |
163 | 132 | ||
164 | /* | 133 | /* |