History

target: Minimize #include directives

Remove superfluous #include directives from the include/target/*.h files. Add missing #include directives to other *.h and *.c files. Use forward declarations for structures where possible. This change reduces the build time for make M=drivers/target on my laptop from 27.1s to 18.7s or by about 30%.

Bart Van Assche committed 10 years ago

Commit 8dcf07b1 parent f50457251 files · +187 −25Browse files

Unified · Split

51 files
  1. drivers/target/iscsi/iscsi_target.c +2 −0
  2. drivers/target/iscsi/iscsi_target.h +12 −0
  3. drivers/target/iscsi/iscsi_target_auth.c +1 −1
  4. drivers/target/iscsi/iscsi_target_auth.h +5 −0
  5. drivers/target/iscsi/iscsi_target_configfs.c +2 −1
  6. drivers/target/iscsi/iscsi_target_datain_values.c +1 −1
  7. drivers/target/iscsi/iscsi_target_datain_values.h +3 −0
  8. drivers/target/iscsi/iscsi_target_device.h +3 −0
  9. drivers/target/iscsi/iscsi_target_erl0.h +6 −0
  10. drivers/target/iscsi/iscsi_target_erl1.c +1 −0
  11. drivers/target/iscsi/iscsi_target_erl1.h +10 −0
  12. drivers/target/iscsi/iscsi_target_erl2.c +1 −0
  13. drivers/target/iscsi/iscsi_target_erl2.h +7 −0
  14. drivers/target/iscsi/iscsi_target_login.c +2 −0
  15. drivers/target/iscsi/iscsi_target_login.h +7 −0
  16. drivers/target/iscsi/iscsi_target_nego.c +2 −0
  17. drivers/target/iscsi/iscsi_target_nego.h +4 −0
  18. drivers/target/iscsi/iscsi_target_nodeattrib.h +5 −0
  19. drivers/target/iscsi/iscsi_target_parameters.c +1 −1
  20. drivers/target/iscsi/iscsi_target_parameters.h +6 −0
  21. drivers/target/iscsi/iscsi_target_seq_pdu_list.h +5 −0
  22. drivers/target/iscsi/iscsi_target_tmr.h +6 −0
  23. drivers/target/iscsi/iscsi_target_tpg.c +1 −1
  24. drivers/target/iscsi/iscsi_target_tpg.h +9 −0
  25. drivers/target/iscsi/iscsi_target_transport.c +1 −0
  26. drivers/target/iscsi/iscsi_target_util.c +1 −0
  27. drivers/target/iscsi/iscsi_target_util.h +8 −0
  28. drivers/target/loopback/tcm_loop.h +4 −0
  29. drivers/target/target_core_alua.c +3 −0
  30. drivers/target/target_core_alua.h +2 −0
  31. drivers/target/target_core_device.c +1 −0
  32. drivers/target/target_core_file.c +1 −0
  33. drivers/target/target_core_file.h +2 −0
  34. drivers/target/target_core_iblock.h +3 −0
  35. drivers/target/target_core_internal.h +5 −0
  36. drivers/target/target_core_pr.c +2 −0
  37. drivers/target/target_core_pr.h +4 −0
  38. drivers/target/target_core_pscsi.h +4 −3
  39. drivers/target/target_core_rd.c +2 −0
  40. drivers/target/target_core_rd.h +4 −0
  41. drivers/target/target_core_sbc.c +1 −0
  42. drivers/target/target_core_ua.h +2 −0
  43. drivers/target/target_core_xcopy.c +1 −0
  44. drivers/target/target_core_xcopy.h +2 −0
  45. drivers/target/tcm_fc/tcm_fc.h +3 −0
  46. include/target/iscsi/iscsi_target_core.h +8 −6
  47. include/target/iscsi/iscsi_target_stat.h +4 −0
  48. include/target/iscsi/iscsi_transport.h +3 −3
  49. include/target/target_core_backend.h +6 −0
  50. include/target/target_core_base.h +4 −8
  51. include/target/target_core_fabric.h +4 −0
drivers/target/iscsi/iscsi_target.c+2−0
@@ -23,7 +23,9 @@ · 22 unmodified lines
2323 #include <linux/module.h>
2424 #include <linux/vmalloc.h>
2525 #include <linux/idr.h>
26+#include <linux/delay.h>
2627 #include <asm/unaligned.h>
28+#include <net/ipv6.h>
2729 #include <scsi/scsi_proto.h>
2830 #include <scsi/iscsi_proto.h>
2931 #include <scsi/scsi_tcq.h>
drivers/target/iscsi/iscsi_target.h+12−0
@@ -1,6 +1,18 @@
11 #ifndef ISCSI_TARGET_H
22 #define ISCSI_TARGET_H
33
4+#include <linux/types.h>
5+#include <linux/spinlock.h>
6+
7+struct iscsi_cmd;
8+struct iscsi_conn;
9+struct iscsi_np;
10+struct iscsi_portal_group;
11+struct iscsi_session;
12+struct iscsi_tpg_np;
13+struct kref;
14+struct sockaddr_storage;
15+
416 extern struct iscsi_tiqn *iscsit_get_tiqn_for_login(unsigned char *);
517 extern struct iscsi_tiqn *iscsit_get_tiqn(unsigned char *, int);
618 extern void iscsit_put_tiqn_for_login(struct iscsi_tiqn *);
drivers/target/iscsi/iscsi_target_auth.c+1−1
@@ -20,8 +20,8 @@ · 19 unmodified lines
2020 #include <linux/kernel.h>
2121 #include <linux/string.h>
2222 #include <linux/err.h>
23+#include <linux/random.h>
2324 #include <linux/scatterlist.h>
24−
2525 #include <target/iscsi/iscsi_target_core.h>
2626 #include "iscsi_target_nego.h"
2727 #include "iscsi_target_auth.h"
drivers/target/iscsi/iscsi_target_auth.h+5−0
@@ -1,6 +1,8 @@
11 #ifndef _ISCSI_CHAP_H_
22 #define _ISCSI_CHAP_H_
33
4+#include <linux/types.h>
5+
46 #define CHAP_DIGEST_UNKNOWN 0
57 #define CHAP_DIGEST_MD5 5
68 #define CHAP_DIGEST_SHA 6
@@ -18,6 +20,9 @@ · 11 unmodified lines
1820 #define CHAP_STAGE_CLIENT_NRIC 4
1921 #define CHAP_STAGE_SERVER_NR 5
2022
23+struct iscsi_node_auth;
24+struct iscsi_conn;
25+
2126 extern u32 chap_main_loop(struct iscsi_conn *, struct iscsi_node_auth *, char *, char *,
2227 int *, int *);
2328
drivers/target/iscsi/iscsi_target_configfs.c+2−1
@@ -21,10 +21,11 @@ · 20 unmodified lines
2121 #include <linux/ctype.h>
2222 #include <linux/export.h>
2323 #include <linux/inet.h>
24+#include <linux/module.h>
25+#include <net/ipv6.h>
2426 #include <target/target_core_base.h>
2527 #include <target/target_core_fabric.h>
2628 #include <target/iscsi/iscsi_transport.h>
27−
2829 #include <target/iscsi/iscsi_target_core.h>
2930 #include "iscsi_target_parameters.h"
3031 #include "iscsi_target_device.h"
drivers/target/iscsi/iscsi_target_datain_values.c+1−1
@@ -16,8 +16,8 @@ · 15 unmodified lines
1616 * GNU General Public License for more details.
1717 ******************************************************************************/
1818
19+#include <linux/slab.h>
1920 #include <scsi/iscsi_proto.h>
20−
2121 #include <target/iscsi/iscsi_target_core.h>
2222 #include "iscsi_target_seq_pdu_list.h"
2323 #include "iscsi_target_erl1.h"
drivers/target/iscsi/iscsi_target_datain_values.h+3−0
@@ -1,6 +1,9 @@
11 #ifndef ISCSI_TARGET_DATAIN_VALUES_H
22 #define ISCSI_TARGET_DATAIN_VALUES_H
33
4+struct iscsi_cmd;
5+struct iscsi_datain;
6+
47 extern struct iscsi_datain_req *iscsit_allocate_datain_req(void);
58 extern void iscsit_attach_datain_req(struct iscsi_cmd *, struct iscsi_datain_req *);
69 extern void iscsit_free_datain_req(struct iscsi_cmd *, struct iscsi_datain_req *);
drivers/target/iscsi/iscsi_target_device.h+3−0
@@ -1,6 +1,9 @@
11 #ifndef ISCSI_TARGET_DEVICE_H
22 #define ISCSI_TARGET_DEVICE_H
33
4+struct iscsi_cmd;
5+struct iscsi_session;
6+
47 extern void iscsit_determine_maxcmdsn(struct iscsi_session *);
58 extern void iscsit_increment_maxcmdsn(struct iscsi_cmd *, struct iscsi_session *);
69
drivers/target/iscsi/iscsi_target_erl0.h+6−0
@@ -1,6 +1,12 @@
11 #ifndef ISCSI_TARGET_ERL0_H
22 #define ISCSI_TARGET_ERL0_H
33
4+#include <linux/types.h>
5+
6+struct iscsi_cmd;
7+struct iscsi_conn;
8+struct iscsi_session;
9+
410 extern void iscsit_set_dataout_sequence_values(struct iscsi_cmd *);
511 extern int iscsit_check_pre_dataout(struct iscsi_cmd *, unsigned char *);
612 extern int iscsit_check_post_dataout(struct iscsi_cmd *, unsigned char *, u8);
drivers/target/iscsi/iscsi_target_erl1.c+1−0
@@ -17,6 +17,7 @@ · 16 unmodified lines
1717 ******************************************************************************/
1818
1919 #include <linux/list.h>
20+#include <linux/slab.h>
2021 #include <scsi/iscsi_proto.h>
2122 #include <target/target_core_base.h>
2223 #include <target/target_core_fabric.h>
drivers/target/iscsi/iscsi_target_erl1.h+10−0
@@ -1,6 +1,16 @@
11 #ifndef ISCSI_TARGET_ERL1_H
22 #define ISCSI_TARGET_ERL1_H
33
4+#include <linux/types.h>
5+#include <scsi/iscsi_proto.h> /* itt_t */
6+
7+struct iscsi_cmd;
8+struct iscsi_conn;
9+struct iscsi_datain_req;
10+struct iscsi_ooo_cmdsn;
11+struct iscsi_pdu;
12+struct iscsi_session;
13+
414 extern int iscsit_dump_data_payload(struct iscsi_conn *, u32, int);
515 extern int iscsit_create_recovery_datain_values_datasequenceinorder_yes(
616 struct iscsi_cmd *, struct iscsi_datain_req *);
drivers/target/iscsi/iscsi_target_erl2.c+1−0
@@ -17,6 +17,7 @@ · 16 unmodified lines
1717 * GNU General Public License for more details.
1818 ******************************************************************************/
1919
20+#include <linux/slab.h>
2021 #include <scsi/iscsi_proto.h>
2122 #include <target/target_core_base.h>
2223 #include <target/target_core_fabric.h>
drivers/target/iscsi/iscsi_target_erl2.h+7−0
@@ -1,6 +1,13 @@
11 #ifndef ISCSI_TARGET_ERL2_H
22 #define ISCSI_TARGET_ERL2_H
33
4+#include <linux/types.h>
5+
6+struct iscsi_cmd;
7+struct iscsi_conn;
8+struct iscsi_conn_recovery;
9+struct iscsi_session;
10+
411 extern void iscsit_create_conn_recovery_datain_values(struct iscsi_cmd *, __be32);
512 extern void iscsit_create_conn_recovery_dataout_values(struct iscsi_cmd *);
613 extern struct iscsi_conn_recovery *iscsit_get_inactive_connection_recovery_entry(
drivers/target/iscsi/iscsi_target_login.c+2−0
@@ -20,6 +20,8 @@ · 19 unmodified lines
2020 #include <linux/string.h>
2121 #include <linux/kthread.h>
2222 #include <linux/idr.h>
23+#include <linux/tcp.h> /* TCP_NODELAY */
24+#include <net/ipv6.h> /* ipv6_addr_v4mapped() */
2325 #include <scsi/iscsi_proto.h>
2426 #include <target/target_core_base.h>
2527 #include <target/target_core_fabric.h>
drivers/target/iscsi/iscsi_target_login.h+7−0
@@ -1,6 +1,13 @@
11 #ifndef ISCSI_TARGET_LOGIN_H
22 #define ISCSI_TARGET_LOGIN_H
33
4+#include <linux/types.h>
5+
6+struct iscsi_conn;
7+struct iscsi_login;
8+struct iscsi_np;
9+struct sockaddr_storage;
10+
411 extern int iscsi_login_setup_crypto(struct iscsi_conn *);
512 extern int iscsi_check_for_session_reinstatement(struct iscsi_conn *);
613 extern int iscsi_login_post_auth_non_zero_tsih(struct iscsi_conn *, u16, u32);
drivers/target/iscsi/iscsi_target_nego.c+2−0
@@ -18,6 +18,8 @@ · 17 unmodified lines
1818
1919 #include <linux/ctype.h>
2020 #include <linux/kthread.h>
21+#include <linux/slab.h>
22+#include <net/sock.h>
2123 #include <scsi/iscsi_proto.h>
2224 #include <target/target_core_base.h>
2325 #include <target/target_core_fabric.h>
drivers/target/iscsi/iscsi_target_nego.h+4−0
@@ -4,6 +4,10 @@ · 3 unmodified lines
44 #define DECIMAL 0
55 #define HEX 1
66
7+struct iscsi_conn;
8+struct iscsi_login;
9+struct iscsi_np;
10+
711 extern void convert_null_to_semi(char *, int);
812 extern int extract_param(const char *, const char *, unsigned int, char *,
913 unsigned char *);
drivers/target/iscsi/iscsi_target_nodeattrib.h+5−0
@@ -1,6 +1,11 @@
11 #ifndef ISCSI_TARGET_NODEATTRIB_H
22 #define ISCSI_TARGET_NODEATTRIB_H
33
4+#include <linux/types.h>
5+
6+struct iscsi_node_acl;
7+struct iscsi_portal_group;
8+
49 extern void iscsit_set_default_node_attribues(struct iscsi_node_acl *,
510 struct iscsi_portal_group *);
611 extern int iscsit_na_dataout_timeout(struct iscsi_node_acl *, u32);
drivers/target/iscsi/iscsi_target_parameters.c+1−1
@@ -17,7 +17,7 @@ · 16 unmodified lines
1717 ******************************************************************************/
1818
1919 #include <linux/slab.h>
20−
20+#include <linux/uio.h> /* struct kvec */
2121 #include <target/iscsi/iscsi_target_core.h>
2222 #include "iscsi_target_util.h"
2323 #include "iscsi_target_parameters.h"
drivers/target/iscsi/iscsi_target_parameters.h+6−0
@@ -1,6 +1,7 @@
11 #ifndef ISCSI_PARAMETERS_H
22 #define ISCSI_PARAMETERS_H
33
4+#include <linux/types.h>
45 #include <scsi/iscsi_proto.h>
56
67 struct iscsi_extra_response {
@@ -23,6 +24,11 @@ struct iscsi_param { · 16 unmodified lines
2324 struct list_head p_list;
2425 } ____cacheline_aligned;
2526
27+struct iscsi_conn;
28+struct iscsi_conn_ops;
29+struct iscsi_param_list;
30+struct iscsi_sess_ops;
31+
2632 extern int iscsi_login_rx_data(struct iscsi_conn *, char *, int);
2733 extern int iscsi_login_tx_data(struct iscsi_conn *, char *, char *, int);
2834 extern void iscsi_dump_conn_ops(struct iscsi_conn_ops *);
drivers/target/iscsi/iscsi_target_seq_pdu_list.h+5−0
@@ -1,6 +1,9 @@
11 #ifndef ISCSI_SEQ_AND_PDU_LIST_H
22 #define ISCSI_SEQ_AND_PDU_LIST_H
33
4+#include <linux/types.h>
5+#include <linux/cache.h>
6+
47 /* struct iscsi_pdu->status */
58 #define DATAOUT_PDU_SENT 1
69
@@ -78,6 +81,8 @@ struct iscsi_seq { · 71 unmodified lines
7881 u32 xfer_len;
7982 } ____cacheline_aligned;
8083
84+struct iscsi_cmd;
85+
8186 extern int iscsit_build_pdu_and_seq_lists(struct iscsi_cmd *, u32);
8287 extern struct iscsi_pdu *iscsit_get_pdu_holder(struct iscsi_cmd *, u32, u32);
8388 extern struct iscsi_pdu *iscsit_get_pdu_holder_for_seq(struct iscsi_cmd *, struct iscsi_seq *);
drivers/target/iscsi/iscsi_target_tmr.h+6−0
@@ -1,6 +1,12 @@
11 #ifndef ISCSI_TARGET_TMR_H
22 #define ISCSI_TARGET_TMR_H
33
4+#include <linux/types.h>
5+
6+struct iscsi_cmd;
7+struct iscsi_conn;
8+struct iscsi_tmr_req;
9+
410 extern u8 iscsit_tmr_abort_task(struct iscsi_cmd *, unsigned char *);
511 extern int iscsit_tmr_task_warm_reset(struct iscsi_conn *, struct iscsi_tmr_req *,
612 unsigned char *);
drivers/target/iscsi/iscsi_target_tpg.c+1−1
@@ -16,9 +16,9 @@ · 15 unmodified lines
1616 * GNU General Public License for more details.
1717 ******************************************************************************/
1818
19+#include <linux/slab.h>
1920 #include <target/target_core_base.h>
2021 #include <target/target_core_fabric.h>
21−
2222 #include <target/iscsi/iscsi_target_core.h>
2323 #include "iscsi_target_erl0.h"
2424 #include "iscsi_target_login.h"
drivers/target/iscsi/iscsi_target_tpg.h+9−0
@@ -1,6 +1,15 @@
11 #ifndef ISCSI_TARGET_TPG_H
22 #define ISCSI_TARGET_TPG_H
33
4+#include <linux/types.h>
5+
6+struct iscsi_np;
7+struct iscsi_session;
8+struct iscsi_tiqn;
9+struct iscsi_tpg_np;
10+struct se_node_acl;
11+struct sockaddr_storage;
12+
413 extern struct iscsi_portal_group *iscsit_alloc_portal_group(struct iscsi_tiqn *, u16);
514 extern int iscsit_load_discovery_tpg(void);
615 extern void iscsit_release_discovery_tpg(void);
drivers/target/iscsi/iscsi_target_transport.c+1−0
@@ -1,5 +1,6 @@
11 #include <linux/spinlock.h>
22 #include <linux/list.h>
3+#include <linux/module.h>
34 #include <target/iscsi/iscsi_transport.h>
45
56 static LIST_HEAD(g_transport_list);
drivers/target/iscsi/iscsi_target_util.c+1−0
@@ -18,6 +18,7 @@ · 17 unmodified lines
1818
1919 #include <linux/list.h>
2020 #include <linux/percpu_ida.h>
21+#include <net/ipv6.h> /* ipv6_addr_equal() */
2122 #include <scsi/scsi_tcq.h>
2223 #include <scsi/iscsi_proto.h>
2324 #include <target/target_core_base.h>
drivers/target/iscsi/iscsi_target_util.h+8−0
@@ -1,8 +1,16 @@
11 #ifndef ISCSI_TARGET_UTIL_H
22 #define ISCSI_TARGET_UTIL_H
33
4+#include <linux/types.h>
5+#include <scsi/iscsi_proto.h> /* itt_t */
6+
47 #define MARKER_SIZE 8
58
9+struct iscsi_cmd;
10+struct iscsi_conn;
11+struct iscsi_conn_recovery;
12+struct iscsi_session;
13+
614 extern int iscsit_add_r2t_to_list(struct iscsi_cmd *, u32, u32, int, u32);
715 extern struct iscsi_r2t *iscsit_get_r2t_for_eos(struct iscsi_cmd *, u32, u32);
816 extern struct iscsi_r2t *iscsit_get_r2t_from_list(struct iscsi_cmd *);
drivers/target/loopback/tcm_loop.h+4−0
@@ -1,3 +1,7 @@
1+#include <linux/types.h>
2+#include <linux/device.h>
3+#include <target/target_core_base.h> /* struct se_cmd */
4+
15 #define TCM_LOOP_VERSION "v2.1-rc2"
26 #define TL_WWN_ADDR_LEN 256
37 #define TL_TPGS_PER_HBA 32
drivers/target/target_core_alua.c+3−0
@@ -26,8 +26,11 @@ · 25 unmodified lines
2626 #include <linux/slab.h>
2727 #include <linux/spinlock.h>
2828 #include <linux/configfs.h>
29+#include <linux/delay.h>
2930 #include <linux/export.h>
31+#include <linux/fcntl.h>
3032 #include <linux/file.h>
33+#include <linux/fs.h>
3134 #include <scsi/scsi_proto.h>
3235 #include <asm/unaligned.h>
3336
drivers/target/target_core_alua.h+2−0
@@ -1,6 +1,8 @@
11 #ifndef TARGET_CORE_ALUA_H
22 #define TARGET_CORE_ALUA_H
33
4+#include <target/target_core_base.h>
5+
46 /*
57 * INQUIRY response data, TPGS Field
68 *
drivers/target/target_core_device.c+1−0
@@ -33,6 +33,7 @@ · 32 unmodified lines
3333 #include <linux/kthread.h>
3434 #include <linux/in.h>
3535 #include <linux/export.h>
36+#include <linux/t10-pi.h>
3637 #include <asm/unaligned.h>
3738 #include <net/sock.h>
3839 #include <net/tcp.h>
drivers/target/target_core_file.c+1−0
@@ -32,6 +32,7 @@ · 31 unmodified lines
3232 #include <linux/module.h>
3333 #include <linux/vmalloc.h>
3434 #include <linux/falloc.h>
35+#include <linux/uio.h>
3536 #include <scsi/scsi_proto.h>
3637 #include <asm/unaligned.h>
3738
drivers/target/target_core_file.h+2−0
@@ -1,6 +1,8 @@
11 #ifndef TARGET_CORE_FILE_H
22 #define TARGET_CORE_FILE_H
33
4+#include <target/target_core_base.h>
5+
46 #define FD_VERSION "4.0"
57
68 #define FD_MAX_DEV_NAME 256
drivers/target/target_core_iblock.h+3−0
@@ -1,6 +1,9 @@
11 #ifndef TARGET_CORE_IBLOCK_H
22 #define TARGET_CORE_IBLOCK_H
33
4+#include <linux/atomic.h>
5+#include <target/target_core_base.h>
6+
47 #define IBLOCK_VERSION "4.0"
58
69 #define IBLOCK_MAX_CDBS 16
drivers/target/target_core_internal.h+5−0
@@ -1,6 +1,11 @@
11 #ifndef TARGET_CORE_INTERNAL_H
22 #define TARGET_CORE_INTERNAL_H
33
4+#include <linux/configfs.h>
5+#include <linux/list.h>
6+#include <linux/types.h>
7+#include <target/target_core_base.h>
8+
49 #define TARGET_CORE_NAME_MAX_LEN 64
510 #define TARGET_FABRIC_NAME_SIZE 32
611
drivers/target/target_core_pr.c+2−0
@@ -29,6 +29,8 @@ · 28 unmodified lines
2929 #include <linux/list.h>
3030 #include <linux/vmalloc.h>
3131 #include <linux/file.h>
32+#include <linux/fcntl.h>
33+#include <linux/fs.h>
3234 #include <scsi/scsi_proto.h>
3335 #include <asm/unaligned.h>
3436
drivers/target/target_core_pr.h+4−0
@@ -1,5 +1,9 @@
11 #ifndef TARGET_CORE_PR_H
22 #define TARGET_CORE_PR_H
3+
4+#include <linux/types.h>
5+#include <target/target_core_base.h>
6+
37 /*
48 * PERSISTENT_RESERVE_OUT service action codes
59 *
drivers/target/target_core_pscsi.h+4−3
@@ -15,11 +15,12 @@ · 14 unmodified lines
1515 #define PS_TIMEOUT_DISK (15*HZ)
1616 #define PS_TIMEOUT_OTHER (500*HZ)
1717
18−#include <linux/device.h>
19−#include <linux/kref.h>
20−#include <linux/kobject.h>
18+#include <linux/cache.h> /* ___cacheline_aligned */
19+#include <target/target_core_base.h> /* struct se_device */
2120
21+struct block_device;
2222 struct scsi_device;
23+struct Scsi_Host;
2324
2425 struct pscsi_plugin_task {
2526 unsigned char pscsi_sense[TRANSPORT_SENSE_BUFFER];
drivers/target/target_core_rd.c+2−0
@@ -26,7 +26,9 @@ · 25 unmodified lines
2626
2727 #include <linux/string.h>
2828 #include <linux/parser.h>
29+#include <linux/highmem.h>
2930 #include <linux/timer.h>
31+#include <linux/scatterlist.h>
3032 #include <linux/slab.h>
3133 #include <linux/spinlock.h>
3234 #include <scsi/scsi_proto.h>
drivers/target/target_core_rd.h+4−0
@@ -1,6 +1,10 @@
11 #ifndef TARGET_CORE_RD_H
22 #define TARGET_CORE_RD_H
33
4+#include <linux/module.h>
5+#include <linux/types.h>
6+#include <target/target_core_base.h>
7+
48 #define RD_HBA_VERSION "v4.0"
59 #define RD_MCP_VERSION "4.0"
610
drivers/target/target_core_sbc.c+1−0
@@ -24,6 +24,7 @@ · 23 unmodified lines
2424 #include <linux/module.h>
2525 #include <linux/ratelimit.h>
2626 #include <linux/crc-t10dif.h>
27+#include <linux/t10-pi.h>
2728 #include <asm/unaligned.h>
2829 #include <scsi/scsi_proto.h>
2930 #include <scsi/scsi_tcq.h>
drivers/target/target_core_ua.h+2−0
@@ -1,6 +1,8 @@
11 #ifndef TARGET_CORE_UA_H
22 #define TARGET_CORE_UA_H
33
4+#include <target/target_core_base.h>
5+
46 /*
57 * From spc4r17, Table D.1: ASC and ASCQ Assignement
68 */
drivers/target/target_core_xcopy.c+1−0
@@ -25,6 +25,7 @@ · 24 unmodified lines
2525 #include <linux/spinlock.h>
2626 #include <linux/list.h>
2727 #include <linux/configfs.h>
28+#include <linux/ratelimit.h>
2829 #include <scsi/scsi_proto.h>
2930 #include <asm/unaligned.h>
3031
drivers/target/target_core_xcopy.h+2−0
@@ -1,3 +1,5 @@
1+#include <target/target_core_base.h>
2+
13 #define XCOPY_TARGET_DESC_LEN 32
24 #define XCOPY_SEGMENT_DESC_LEN 28
35 #define XCOPY_NAA_IEEE_REGEX_LEN 16
drivers/target/tcm_fc/tcm_fc.h+3−0
@@ -17,6 +17,9 @@ · 16 unmodified lines
1717 #ifndef __TCM_FC_H__
1818 #define __TCM_FC_H__
1919
20+#include <linux/types.h>
21+#include <target/target_core_base.h>
22+
2023 #define FT_VERSION "0.4"
2124
2225 #define FT_NAMELEN 32 /* length of ASCII WWPNs including pad */
include/target/iscsi/iscsi_target_core.h+8−6
@@ -1,12 +1,14 @@
11 #ifndef ISCSI_TARGET_CORE_H
22 #define ISCSI_TARGET_CORE_H
33
4−#include <linux/in.h>
5−#include <linux/configfs.h>
6−#include <net/sock.h>
7−#include <net/tcp.h>
8−#include <scsi/iscsi_proto.h>
9−#include <target/target_core_base.h>
4+#include <linux/dma-direction.h> /* enum dma_data_direction */
5+#include <linux/list.h> /* struct list_head */
6+#include <linux/socket.h> /* struct sockaddr_storage */
7+#include <linux/types.h> /* u8 */
8+#include <scsi/iscsi_proto.h> /* itt_t */
9+#include <target/target_core_base.h> /* struct se_cmd */
10+
11+struct sock;
1012
1113 #define ISCSIT_VERSION "v4.1.0"
1214 #define ISCSI_MAX_DATASN_MISSING_COUNT 16
include/target/iscsi/iscsi_target_stat.h+4−0
@@ -1,6 +1,10 @@
11 #ifndef ISCSI_TARGET_STAT_H
22 #define ISCSI_TARGET_STAT_H
33
4+#include <linux/types.h>
5+#include <linux/spinlock.h>
6+#include <linux/socket.h>
7+
48 /*
59 * For struct iscsi_tiqn->tiqn_wwn default groups
610 */
include/target/iscsi/iscsi_transport.h+3−3
@@ -1,6 +1,6 @@
1−#include <linux/module.h>
2−#include <linux/list.h>
3−#include "iscsi_target_core.h"
1+#include "iscsi_target_core.h" /* struct iscsi_cmd */
2+
3+struct sockaddr_storage;
44
55 struct iscsit_transport {
66 #define ISCSIT_TRANSPORT_NAME 16
include/target/target_core_backend.h+6−0
@@ -1,8 +1,14 @@
11 #ifndef TARGET_CORE_BACKEND_H
22 #define TARGET_CORE_BACKEND_H
33
4+#include <linux/types.h>
5+#include <target/target_core_base.h>
6+
47 #define TRANSPORT_FLAG_PASSTHROUGH 1
58
9+struct request_queue;
10+struct scatterlist;
11+
612 struct target_backend_ops {
713 char name[16];
814 char inquiry_prod[16];
include/target/target_core_base.h+4−8
@@ -1,14 +1,10 @@
11 #ifndef TARGET_CORE_BASE_H
22 #define TARGET_CORE_BASE_H
33
4−#include <linux/in.h>
5−#include <linux/configfs.h>
6−#include <linux/dma-mapping.h>
7−#include <linux/blkdev.h>
8−#include <linux/percpu_ida.h>
9−#include <linux/t10-pi.h>
10−#include <net/sock.h>
11−#include <net/tcp.h>
4+#include <linux/configfs.h> /* struct config_group */
5+#include <linux/dma-direction.h> /* enum dma_data_direction */
6+#include <linux/percpu_ida.h> /* struct percpu_ida */
7+#include <linux/semaphore.h> /* struct semaphore */
128
139 #define TARGET_CORE_VERSION "v5.0"
1410
include/target/target_core_fabric.h+4−0
@@ -1,6 +1,10 @@
11 #ifndef TARGET_CORE_FABRIC_H
22 #define TARGET_CORE_FABRIC_H
33
4+#include <linux/configfs.h>
5+#include <linux/types.h>
6+#include <target/target_core_base.h>
7+
48 struct target_core_fabric_ops {
59 struct module *module;
610 const char *name;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t