linux-scsi.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Nicholas A. Bellinger" <nab@linux-iscsi.org>
To: linux-scsi <linux-scsi@vger.kernel.org>,
	James Bottomley <James.Bottomley@HansenPartnership.com>
Cc: Christoph Hellwig <hch@lst.de>,
	"Nicholas A. Bellinger" <nab@linux-iscsi.org>
Subject: [PATCH 11/31] target: do not include target_core_mib.h under include/target
Date: Wed,  9 Feb 2011 15:34:46 -0800	[thread overview]
Message-ID: <1297294506-23579-12-git-send-email-nab@linux-iscsi.org> (raw)
In-Reply-To: <1297294506-23579-1-git-send-email-nab@linux-iscsi.org>

From: Christoph Hellwig <hch@lst.de>

Headers under include/ should not include headers that require a specific
include path.  Fix this by moving the defintion of scsi_port_stats to
target_core_base.h, and including target_core_mib.h directly where needed.

Signed-off-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Nicholas A. Bellinger <nab@linux-iscsi.org>
---
 drivers/target/target_core_configfs.c  |    1 +
 drivers/target/target_core_hba.c       |    1 +
 drivers/target/target_core_mib.h       |    7 -------
 drivers/target/target_core_tpg.c       |    1 +
 drivers/target/target_core_transport.c |    1 +
 include/target/target_core_base.h      |    8 +++++++-
 6 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/drivers/target/target_core_configfs.c b/drivers/target/target_core_configfs.c
index 656c4fa..96b87da 100644
--- a/drivers/target/target_core_configfs.c
+++ b/drivers/target/target_core_configfs.c
@@ -51,6 +51,7 @@
 #include "target_core_hba.h"
 #include "target_core_pr.h"
 #include "target_core_rd.h"
+#include "target_core_mib.h"
 
 static struct list_head g_tf_list;
 static struct mutex g_tf_lock;
diff --git a/drivers/target/target_core_hba.c b/drivers/target/target_core_hba.c
index 4bbe820..29dc3fa 100644
--- a/drivers/target/target_core_hba.c
+++ b/drivers/target/target_core_hba.c
@@ -43,6 +43,7 @@
 #include <target/target_core_transport.h>
 
 #include "target_core_hba.h"
+#include "target_core_mib.h"
 
 static LIST_HEAD(subsystem_list);
 static DEFINE_MUTEX(subsystem_mutex);
diff --git a/drivers/target/target_core_mib.h b/drivers/target/target_core_mib.h
index 2772046..5172674 100644
--- a/drivers/target/target_core_mib.h
+++ b/drivers/target/target_core_mib.h
@@ -13,13 +13,6 @@ struct scsi_index_table {
 	u32 		scsi_mib_index[SCSI_INDEX_TYPE_MAX];
 } ____cacheline_aligned;
 
-/* SCSI Port stats */
-struct scsi_port_stats {
-	u64	cmd_pdus;
-	u64	tx_data_octets;
-	u64	rx_data_octets;
-} ____cacheline_aligned;
-
 extern int init_scsi_target_mib(void);
 extern void remove_scsi_target_mib(void);
 extern void init_scsi_index_table(void);
diff --git a/drivers/target/target_core_tpg.c b/drivers/target/target_core_tpg.c
index d15deaf..1f69be1 100644
--- a/drivers/target/target_core_tpg.c
+++ b/drivers/target/target_core_tpg.c
@@ -45,6 +45,7 @@
 #include <target/target_core_fabric_ops.h>
 
 #include "target_core_hba.h"
+#include "target_core_mib.h"
 
 /*	core_clear_initiator_node_from_tpg():
  *
diff --git a/drivers/target/target_core_transport.c b/drivers/target/target_core_transport.c
index 28b6292..8cb628b 100644
--- a/drivers/target/target_core_transport.c
+++ b/drivers/target/target_core_transport.c
@@ -58,6 +58,7 @@
 #include "target_core_pr.h"
 #include "target_core_scdb.h"
 #include "target_core_ua.h"
+#include "target_core_mib.h"
 
 /* #define DEBUG_CDB_HANDLER */
 #ifdef DEBUG_CDB_HANDLER
diff --git a/include/target/target_core_base.h b/include/target/target_core_base.h
index 764177b..c071907 100644
--- a/include/target/target_core_base.h
+++ b/include/target/target_core_base.h
@@ -8,7 +8,6 @@
 #include <scsi/scsi_cmnd.h>
 #include <net/sock.h>
 #include <net/tcp.h>
-#include "target_core_mib.h"
 
 #define TARGET_CORE_MOD_VERSION		"v4.0.0-rc6"
 #define SHUTDOWN_SIGS	(sigmask(SIGKILL)|sigmask(SIGINT)|sigmask(SIGABRT))
@@ -175,6 +174,13 @@ struct se_obj {
 	atomic_t obj_access_count;
 } ____cacheline_aligned;
 
+/* SCSI Port stats */
+struct scsi_port_stats {
+	u64	cmd_pdus;
+	u64	tx_data_octets;
+	u64	rx_data_octets;
+} ____cacheline_aligned;
+
 /*
  * Used by TCM Core internally to signal if ALUA emulation is enabled or
  * disabled, or running in with TCM/pSCSI passthrough mode
-- 
1.7.4


  parent reply	other threads:[~2011-02-09 23:35 UTC|newest]

Thread overview: 31+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-09 23:34 [PATCH 00/31] target: mainline updates for .38-rc5 Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 01/31] target: iblock/pscsi claim checking for NULL instead of IS_ERR Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 02/31] target: fix dubious one-bit signed bitfield Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 03/31] target/iblock: Fix failed bd claim NULL pointer dereference Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 04/31] target: Fix memory leak on error path Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 05/31] target/file: Fix memory leak in fd_set_configfs_dev_params() Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 06/31] target/iblock: Fix memory leak in iblock_set_configfs_dev_params Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 07/31] target: Fix memory leaks in target_core_dev_pr_store_attr_res_aptpl_metadata Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 08/31] target: Fix demo-mode MappedLUN shutdown UA/PR breakage Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 09/31] target: Release left-over demo-mode NodeACLs w/ tfo->tpg_check_demo_mode_cache()=1 Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 10/31] target: tcm_mod_builder.py generated Makefile cleanups Nicholas A. Bellinger
2011-02-09 23:34 ` Nicholas A. Bellinger [this message]
2011-02-09 23:34 ` [PATCH 12/31] target: Convert backend ->create_virtdevice() call to return ERR_PTR Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 13/31] target: Drop nacl->device_list_lock on core_update_device_list_for_node failure Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 14/31] target: Convert rd_build_device_space() to use errno Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 15/31] target: Convert TMR REQ/RSP definitions to target namespace Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 16/31] target core v4.0.0-rc7 Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 17/31] target: Avoid mem leak and needless work in transport_generic_get_mem Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 18/31] target: Fix top-level configfs_subsystem default_group shutdown breakage Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 19/31] target: Move core_delete_hba() into ->release() callback Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 20/31] target: Move subdev release logic " Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 21/31] target: Move core_alua_free_lu_gp() " Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 22/31] target: Move core_alua_free_tg_pt_gp() " Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 23/31] target: Move fabric dependent struct se_wwn free " Nicholas A. Bellinger
2011-02-09 23:34 ` [PATCH 24/31] target: Move fabric dependent se_portal_group " Nicholas A. Bellinger
2011-02-09 23:35 ` [PATCH 25/31] target: Move fabric dependent se_node_acl free into ->release callback() Nicholas A. Bellinger
2011-02-09 23:35 ` [PATCH 26/31] target: Move fabric dependent struct se_tpg_np free into ->release() callback Nicholas A. Bellinger
2011-02-09 23:35 ` [PATCH 27/31] target: Move fabric independent se_lun_acl " Nicholas A. Bellinger
2011-02-09 23:35 ` [PATCH 28/31] target: Remove procfs based target_core_mib.c code Nicholas A. Bellinger
2011-02-09 23:35 ` [PATCH 29/31] target: Fix SCF_SCSI_CONTROL_SG_IO_CDB breakage Nicholas A. Bellinger
2011-02-09 23:35 ` [PATCH 30/31] target: Fix bogus return in transport_add_device_to_core_hba failure path Nicholas A. Bellinger

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1297294506-23579-12-git-send-email-nab@linux-iscsi.org \
    --to=nab@linux-iscsi.org \
    --cc=James.Bottomley@HansenPartnership.com \
    --cc=hch@lst.de \
    --cc=linux-scsi@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).