From 0a6fe8551ac9807a8b6ad62241ec8048cf9f9025 Mon Sep 17 00:00:00 2001 From: Yaniv Kaul Date: Sun, 9 Jun 2019 13:31:31 +0300 Subject: multiple files: another attempt to remove includes There are many include statements that are not needed. A previous more ambitious attempt failed because of *BSD plafrom (see https://review.gluster.org/#/c/glusterfs/+/21929/ ) Now trying a more conservative reduction. It does not solve all circular deps that we have, but it does reduce some of them. There is just too much to handle reasonably (dht-common.h includes dht-lock.h which includes dht-common.h ...), but it does reduce the overall number of lines of include we need to look at in the future to understand and fix the mess later one. Change-Id: I550cd001bdefb8be0fe67632f783c0ef6bee3f9f updates: bz#1193929 Signed-off-by: Yaniv Kaul --- xlators/storage/posix/src/posix-aio.c | 2 -- xlators/storage/posix/src/posix-aio.h | 3 --- xlators/storage/posix/src/posix-common.c | 9 --------- xlators/storage/posix/src/posix-entry-ops.c | 6 ------ xlators/storage/posix/src/posix-gfid-path.c | 5 +++-- xlators/storage/posix/src/posix-gfid-path.h | 7 +++++-- xlators/storage/posix/src/posix-handle.c | 3 --- xlators/storage/posix/src/posix-helpers.c | 8 -------- xlators/storage/posix/src/posix-inode-fd-ops.c | 8 +------- xlators/storage/posix/src/posix-inode-handle.h | 1 - xlators/storage/posix/src/posix.h | 2 -- 11 files changed, 9 insertions(+), 45 deletions(-) (limited to 'xlators/storage') diff --git a/xlators/storage/posix/src/posix-aio.c b/xlators/storage/posix/src/posix-aio.c index 971ace94754..d0cb0002bbf 100644 --- a/xlators/storage/posix/src/posix-aio.c +++ b/xlators/storage/posix/src/posix-aio.c @@ -7,8 +7,6 @@ later), or the GNU General Public License, version 2 (GPLv2), in all cases as published by the Free Software Foundation. */ -#include -#include #include "posix.h" #include #include "posix-messages.h" diff --git a/xlators/storage/posix/src/posix-aio.h b/xlators/storage/posix/src/posix-aio.h index d2589bffc07..b316deb3229 100644 --- a/xlators/storage/posix/src/posix-aio.h +++ b/xlators/storage/posix/src/posix-aio.h @@ -10,9 +10,6 @@ #ifndef _POSIX_AIO_H #define _POSIX_AIO_H -#include -#include - // Maximum number of concurrently submitted IO events. The heaviest load // GlusterFS has been able to handle had 60-80 concurrent calls #define POSIX_AIO_MAX_NR_EVENTS 256 diff --git a/xlators/storage/posix/src/posix-common.c b/xlators/storage/posix/src/posix-common.c index 31dc9495af1..a2b94256e3f 100644 --- a/xlators/storage/posix/src/posix-common.c +++ b/xlators/storage/posix/src/posix-common.c @@ -36,15 +36,7 @@ #include #endif /* HAVE_LINKAT */ -#include -#include -#include -#include -#include "posix.h" #include "posix-inode-handle.h" -#include -#include -#include #include #include #include @@ -53,7 +45,6 @@ #include #include #include "glusterfs3-xdr.h" -#include #include "posix-aio.h" #include #include "posix-messages.h" diff --git a/xlators/storage/posix/src/posix-entry-ops.c b/xlators/storage/posix/src/posix-entry-ops.c index 0b612dcc99c..aab88f0d20a 100644 --- a/xlators/storage/posix/src/posix-entry-ops.c +++ b/xlators/storage/posix/src/posix-entry-ops.c @@ -36,15 +36,10 @@ #include #endif /* HAVE_LINKAT */ -#include -#include #include #include #include "posix.h" #include "posix-handle.h" -#include -#include -#include #include #include #include @@ -53,7 +48,6 @@ #include #include #include "glusterfs3-xdr.h" -#include #include "posix-aio.h" #include #include "posix-messages.h" diff --git a/xlators/storage/posix/src/posix-gfid-path.c b/xlators/storage/posix/src/posix-gfid-path.c index 64b5c6c3f09..d7ba324a95f 100644 --- a/xlators/storage/posix/src/posix-gfid-path.c +++ b/xlators/storage/posix/src/posix-gfid-path.c @@ -8,8 +8,9 @@ cases as published by the Free Software Foundation. */ -#include -#include +#include + +#include #include #include #include "posix-messages.h" diff --git a/xlators/storage/posix/src/posix-gfid-path.h b/xlators/storage/posix/src/posix-gfid-path.h index 323f11429a8..63b2a8c61fa 100644 --- a/xlators/storage/posix/src/posix-gfid-path.h +++ b/xlators/storage/posix/src/posix-gfid-path.h @@ -11,10 +11,13 @@ #ifndef _POSIX_GFID_PATH_H #define _POSIX_GFID_PATH_H -#include -#include #include +#include // for int32_t +#include "glusterfs/dict.h" // for dict_t +#include "glusterfs/glusterfs.h" // for gf_boolean_t +#include "glusterfs/inode.h" // for inode_t +#include "uuid.h" // for uuid_t #define MAX_GFID2PATH_LINK_SUP 500 int32_t diff --git a/xlators/storage/posix/src/posix-handle.c b/xlators/storage/posix/src/posix-handle.c index dac55e17118..4764c47cbae 100644 --- a/xlators/storage/posix/src/posix-handle.c +++ b/xlators/storage/posix/src/posix-handle.c @@ -16,11 +16,8 @@ #include #endif -#include - #include "posix-handle.h" #include "posix.h" -#include #include #include "posix-messages.h" #include "posix-metadata.h" diff --git a/xlators/storage/posix/src/posix-helpers.c b/xlators/storage/posix/src/posix-helpers.c index bab79f42c2f..686b0becbc2 100644 --- a/xlators/storage/posix/src/posix-helpers.c +++ b/xlators/storage/posix/src/posix-helpers.c @@ -33,17 +33,10 @@ #endif /* GF_BSD_HOST_OS */ #include -#include -#include -#include -#include #include "posix.h" #include "posix-messages.h" #include "posix-metadata.h" #include "posix-handle.h" -#include -#include -#include #include #include #include @@ -52,7 +45,6 @@ #include #include #include "glusterfs3-xdr.h" -#include #include #include "posix-gfid-path.h" #include diff --git a/xlators/storage/posix/src/posix-inode-fd-ops.c b/xlators/storage/posix/src/posix-inode-fd-ops.c index 8beb80d7696..e3b2692ad9c 100644 --- a/xlators/storage/posix/src/posix-inode-fd-ops.c +++ b/xlators/storage/posix/src/posix-inode-fd-ops.c @@ -37,14 +37,10 @@ #include #endif /* HAVE_LINKAT */ -#include #include #include #include -#include "posix.h" -#include -#include -#include +#include "posix-handle.h" #include #include #include @@ -53,8 +49,6 @@ #include #include #include "glusterfs3-xdr.h" -#include -#include "posix-aio.h" #include #include "posix-messages.h" #include "posix-metadata.h" diff --git a/xlators/storage/posix/src/posix-inode-handle.h b/xlators/storage/posix/src/posix-inode-handle.h index 2009421cdba..78a85b34c31 100644 --- a/xlators/storage/posix/src/posix-inode-handle.h +++ b/xlators/storage/posix/src/posix-inode-handle.h @@ -12,7 +12,6 @@ #include #include -#include #include #include "posix.h" diff --git a/xlators/storage/posix/src/posix.h b/xlators/storage/posix/src/posix.h index 02e7003a57b..da590b53e1b 100644 --- a/xlators/storage/posix/src/posix.h +++ b/xlators/storage/posix/src/posix.h @@ -32,11 +32,9 @@ #include #endif -#include #include #include #include "posix-mem-types.h" -#include "posix-handle.h" #include #ifdef HAVE_LIBAIO -- cgit