Skip to content
This repository has been archived by the owner on Dec 14, 2022. It is now read-only.

Commit

Permalink
target: header reshuffle, part2
Browse files Browse the repository at this point in the history
This reorganized the headers under include/target into:

 - target_core_base.h stays as is with all target-wide data stuctures and defines
 - target_core_backend.h contains the whole interface to I/O backends
 - target_core_fabric.h contains the whole interface to fabric modules

Except for those only the various configfs macro headers stay around.

Signed-off-by: Christoph Hellwig <[email protected]>
Signed-off-by: Nicholas Bellinger <[email protected]>
  • Loading branch information
Christoph Hellwig authored and Nicholas Bellinger committed Dec 14, 2011
1 parent e26d99a commit c4795fb
Show file tree
Hide file tree
Showing 44 changed files with 288 additions and 462 deletions.
15 changes: 3 additions & 12 deletions Documentation/target/tcm_mod_builder.py
Original file line number Diff line number Diff line change
Expand Up @@ -230,14 +230,9 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):
buf += "#include <linux/ctype.h>\n"
buf += "#include <asm/unaligned.h>\n\n"
buf += "#include <target/target_core_base.h>\n"
buf += "#include <target/target_core_transport.h>\n"
buf += "#include <target/target_core_fabric_ops.h>\n"
buf += "#include <target/target_core_fabric.h>\n"
buf += "#include <target/target_core_fabric_configfs.h>\n"
buf += "#include <target/target_core_fabric_lib.h>\n"
buf += "#include <target/target_core_device.h>\n"
buf += "#include <target/target_core_tpg.h>\n"
buf += "#include <target/target_core_configfs.h>\n"
buf += "#include <target/target_core_base.h>\n"
buf += "#include <target/configfs_macros.h>\n\n"
buf += "#include \"" + fabric_mod_name + "_base.h\"\n"
buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n"
Expand Down Expand Up @@ -514,7 +509,7 @@ def tcm_mod_build_configfs(proto_ident, fabric_mod_dir_var, fabric_mod_name):

def tcm_mod_scan_fabric_ops(tcm_dir):

fabric_ops_api = tcm_dir + "include/target/target_core_fabric_ops.h"
fabric_ops_api = tcm_dir + "include/target/target_core_fabric.h"

print "Using tcm_mod_scan_fabric_ops: " + fabric_ops_api
process_fo = 0;
Expand Down Expand Up @@ -579,11 +574,7 @@ def tcm_mod_dump_fabric_ops(proto_ident, fabric_mod_dir_var, fabric_mod_name):
buf += "#include <scsi/scsi_cmnd.h>\n"
buf += "#include <scsi/libfc.h>\n\n"
buf += "#include <target/target_core_base.h>\n"
buf += "#include <target/target_core_transport.h>\n"
buf += "#include <target/target_core_fabric_ops.h>\n"
buf += "#include <target/target_core_fabric_lib.h>\n"
buf += "#include <target/target_core_device.h>\n"
buf += "#include <target/target_core_tpg.h>\n"
buf += "#include <target/target_core_fabric.h>\n"
buf += "#include <target/target_core_configfs.h>\n\n"
buf += "#include \"" + fabric_mod_name + "_base.h\"\n"
buf += "#include \"" + fabric_mod_name + "_fabric.h\"\n\n"
Expand Down
3 changes: 1 addition & 2 deletions drivers/target/iscsi/iscsi_target.c
Original file line number Diff line number Diff line change
Expand Up @@ -27,8 +27,7 @@
#include <scsi/scsi_device.h>
#include <scsi/iscsi_proto.h>
#include <target/target_core_base.h>
#include <target/target_core_tmr.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric.h>

#include "iscsi_target_core.h"
#include "iscsi_target_parameters.h"
Expand Down
6 changes: 1 addition & 5 deletions drivers/target/iscsi/iscsi_target_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,8 @@
#include <linux/configfs.h>
#include <linux/export.h>
#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_fabric.h>
#include <target/target_core_fabric_configfs.h>
#include <target/target_core_fabric_lib.h>
#include <target/target_core_device.h>
#include <target/target_core_tpg.h>
#include <target/target_core_configfs.h>
#include <target/configfs_macros.h>

Expand Down
3 changes: 1 addition & 2 deletions drivers/target/iscsi/iscsi_target_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,8 +21,7 @@

#include <scsi/scsi_device.h>
#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric.h>

#include "iscsi_target_core.h"
#include "iscsi_target_device.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/target/iscsi/iscsi_target_erl0.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <scsi/iscsi_proto.h>
#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric.h>

#include "iscsi_target_core.h"
#include "iscsi_target_seq_pdu_list.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/target/iscsi/iscsi_target_erl1.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <linux/list.h>
#include <scsi/iscsi_proto.h>
#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric.h>

#include "iscsi_target_core.h"
#include "iscsi_target_seq_pdu_list.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/target/iscsi/iscsi_target_erl2.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@

#include <scsi/iscsi_proto.h>
#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric.h>

#include "iscsi_target_core.h"
#include "iscsi_target_datain_values.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/target/iscsi/iscsi_target_login.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@
#include <linux/crypto.h>
#include <scsi/iscsi_proto.h>
#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric.h>

#include "iscsi_target_core.h"
#include "iscsi_target_tq.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/target/iscsi/iscsi_target_nego.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <linux/ctype.h>
#include <scsi/iscsi_proto.h>
#include <target/target_core_base.h>
#include <target/target_core_tpg.h>
#include <target/target_core_fabric.h>

#include "iscsi_target_core.h"
#include "iscsi_target_parameters.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/target/iscsi/iscsi_target_nodeattrib.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,6 @@
******************************************************************************/

#include <target/target_core_base.h>
#include <target/target_core_transport.h>

#include "iscsi_target_core.h"
#include "iscsi_target_device.h"
Expand Down
1 change: 0 additions & 1 deletion drivers/target/iscsi/iscsi_target_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,6 @@
#include <linux/export.h>
#include <scsi/iscsi_proto.h>
#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/configfs_macros.h>

#include "iscsi_target_core.h"
Expand Down
2 changes: 1 addition & 1 deletion drivers/target/iscsi/iscsi_target_tmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
#include <asm/unaligned.h>
#include <scsi/iscsi_proto.h>
#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric.h>

#include "iscsi_target_core.h"
#include "iscsi_target_seq_pdu_list.h"
Expand Down
4 changes: 1 addition & 3 deletions drivers/target/iscsi/iscsi_target_tpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -19,10 +19,8 @@
******************************************************************************/

#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_fabric.h>
#include <target/target_core_configfs.h>
#include <target/target_core_tpg.h>

#include "iscsi_target_core.h"
#include "iscsi_target_erl0.h"
Expand Down
4 changes: 1 addition & 3 deletions drivers/target/iscsi/iscsi_target_util.c
Original file line number Diff line number Diff line change
Expand Up @@ -22,9 +22,7 @@
#include <scsi/scsi_tcq.h>
#include <scsi/iscsi_proto.h>
#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_tmr.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_fabric.h>
#include <target/target_core_configfs.h>

#include "iscsi_target_core.h"
Expand Down
7 changes: 1 addition & 6 deletions drivers/target/loopback/tcm_loop.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,14 +33,9 @@
#include <scsi/scsi_cmnd.h>

#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_fabric.h>
#include <target/target_core_fabric_configfs.h>
#include <target/target_core_fabric_lib.h>
#include <target/target_core_configfs.h>
#include <target/target_core_device.h>
#include <target/target_core_tpg.h>
#include <target/target_core_tmr.h>

#include "tcm_loop.h"

Expand Down
5 changes: 2 additions & 3 deletions drivers/target/target_core_alua.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,9 +32,8 @@
#include <scsi/scsi_cmnd.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>
#include <target/target_core_configfs.h>

#include "target_core_internal.h"
Expand Down
4 changes: 2 additions & 2 deletions drivers/target/target_core_cdb.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,8 @@
#include <scsi/scsi.h>

#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>

#include "target_core_internal.h"
#include "target_core_ua.h"
Expand Down
5 changes: 2 additions & 3 deletions drivers/target/target_core_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,8 @@
#include <linux/spinlock.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>
#include <target/target_core_fabric_configfs.h>
#include <target/target_core_configfs.h>
#include <target/configfs_macros.h>
Expand Down
6 changes: 2 additions & 4 deletions drivers/target/target_core_device.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,8 @@
#include <scsi/scsi_device.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_tpg.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>

#include "target_core_internal.h"
#include "target_core_alua.h"
Expand Down
5 changes: 1 addition & 4 deletions drivers/target/target_core_fabric_configfs.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,7 @@
#include <linux/configfs.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_tpg.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_fabric.h>
#include <target/target_core_fabric_configfs.h>
#include <target/target_core_configfs.h>
#include <target/configfs_macros.h>
Expand Down
5 changes: 1 addition & 4 deletions drivers/target/target_core_fabric_lib.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,7 @@
#include <scsi/scsi_cmnd.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_lib.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_fabric.h>
#include <target/target_core_configfs.h>

#include "target_core_internal.h"
Expand Down
3 changes: 1 addition & 2 deletions drivers/target/target_core_file.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,8 +37,7 @@
#include <scsi/scsi_host.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_transport.h>
#include <target/target_core_backend.h>

#include "target_core_file.h"

Expand Down
5 changes: 2 additions & 3 deletions drivers/target/target_core_hba.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,8 @@
#include <net/tcp.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_tpg.h>
#include <target/target_core_transport.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>

#include "target_core_internal.h"

Expand Down
3 changes: 1 addition & 2 deletions drivers/target/target_core_iblock.c
Original file line number Diff line number Diff line change
Expand Up @@ -42,8 +42,7 @@
#include <scsi/scsi_host.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_transport.h>
#include <target/target_core_backend.h>

#include "target_core_iblock.h"

Expand Down
7 changes: 2 additions & 5 deletions drivers/target/target_core_pr.c
Original file line number Diff line number Diff line change
Expand Up @@ -33,11 +33,8 @@
#include <asm/unaligned.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_tmr.h>
#include <target/target_core_tpg.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>
#include <target/target_core_configfs.h>

#include "target_core_internal.h"
Expand Down
3 changes: 1 addition & 2 deletions drivers/target/target_core_pscsi.c
Original file line number Diff line number Diff line change
Expand Up @@ -44,8 +44,7 @@
#include <scsi/scsi_tcq.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_transport.h>
#include <target/target_core_backend.h>

#include "target_core_pscsi.h"

Expand Down
4 changes: 1 addition & 3 deletions drivers/target/target_core_rd.c
Original file line number Diff line number Diff line change
Expand Up @@ -37,9 +37,7 @@
#include <scsi/scsi_host.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_backend.h>

#include "target_core_rd.h"

Expand Down
4 changes: 2 additions & 2 deletions drivers/target/target_core_stat.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,8 +43,8 @@
#include <scsi/scsi_host.h>

#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>
#include <target/target_core_configfs.h>
#include <target/configfs_macros.h>

Expand Down
6 changes: 2 additions & 4 deletions drivers/target/target_core_tmr.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,8 @@
#include <scsi/scsi_cmnd.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_tmr.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>
#include <target/target_core_configfs.h>

#include "target_core_internal.h"
Expand Down
6 changes: 2 additions & 4 deletions drivers/target/target_core_tpg.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,10 +39,8 @@
#include <scsi/scsi_cmnd.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_tpg.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>

#include "target_core_internal.h"

Expand Down
7 changes: 2 additions & 5 deletions drivers/target/target_core_transport.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,11 +45,8 @@
#include <scsi/scsi_tcq.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_tmr.h>
#include <target/target_core_tpg.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_backend.h>
#include <target/target_core_fabric.h>
#include <target/target_core_configfs.h>

#include "target_core_internal.h"
Expand Down
4 changes: 1 addition & 3 deletions drivers/target/target_core_ua.c
Original file line number Diff line number Diff line change
Expand Up @@ -30,9 +30,7 @@
#include <scsi/scsi_cmnd.h>

#include <target/target_core_base.h>
#include <target/target_core_device.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_fabric.h>
#include <target/target_core_configfs.h>

#include "target_core_internal.h"
Expand Down
6 changes: 1 addition & 5 deletions drivers/target/tcm_fc/tfc_cmd.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,12 +39,8 @@
#include <scsi/fc_encode.h>

#include <target/target_core_base.h>
#include <target/target_core_transport.h>
#include <target/target_core_fabric_ops.h>
#include <target/target_core_device.h>
#include <target/target_core_tpg.h>
#include <target/target_core_fabric.h>
#include <target/target_core_configfs.h>
#include <target/target_core_tmr.h>
#include <target/configfs_macros.h>

#include "tcm_fc.h"
Expand Down
Loading

0 comments on commit c4795fb

Please sign in to comment.