diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-06-09 13:31:31 +0300 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-06-14 16:50:32 +0000 |
commit | 0a6fe8551ac9807a8b6ad62241ec8048cf9f9025 (patch) | |
tree | 7f6d6b7920ed775c75ca7b4a3dd14aceef5eec38 /xlators/storage | |
parent | 65e3624091e895ca32cd91468552589f34d17595 (diff) |
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 <ykaul@redhat.com>
Diffstat (limited to 'xlators/storage')
-rw-r--r-- | xlators/storage/posix/src/posix-aio.c | 2 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-aio.h | 3 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-common.c | 9 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-entry-ops.c | 6 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-gfid-path.c | 5 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-gfid-path.h | 7 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-handle.c | 3 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-helpers.c | 8 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-inode-fd-ops.c | 8 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix-inode-handle.h | 1 | ||||
-rw-r--r-- | xlators/storage/posix/src/posix.h | 2 |
11 files changed, 9 insertions, 45 deletions
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 <glusterfs/xlator.h> -#include <glusterfs/glusterfs.h> #include "posix.h" #include <sys/uio.h> #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 <glusterfs/xlator.h> -#include <glusterfs/glusterfs.h> - // 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 <fcntl.h> #endif /* HAVE_LINKAT */ -#include <glusterfs/glusterfs.h> -#include <glusterfs/checksum.h> -#include <glusterfs/dict.h> -#include <glusterfs/logging.h> -#include "posix.h" #include "posix-inode-handle.h" -#include <glusterfs/xlator.h> -#include <glusterfs/defaults.h> -#include <glusterfs/common-utils.h> #include <glusterfs/compat-errno.h> #include <glusterfs/compat.h> #include <glusterfs/byte-order.h> @@ -53,7 +45,6 @@ #include <glusterfs/locking.h> #include <glusterfs/timer.h> #include "glusterfs3-xdr.h" -#include <glusterfs/hashfn.h> #include "posix-aio.h" #include <glusterfs/glusterfs-acl.h> #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 <fcntl.h> #endif /* HAVE_LINKAT */ -#include <glusterfs/glusterfs.h> -#include <glusterfs/checksum.h> #include <glusterfs/dict.h> #include <glusterfs/logging.h> #include "posix.h" #include "posix-handle.h" -#include <glusterfs/xlator.h> -#include <glusterfs/defaults.h> -#include <glusterfs/common-utils.h> #include <glusterfs/compat-errno.h> #include <glusterfs/compat.h> #include <glusterfs/byte-order.h> @@ -53,7 +48,6 @@ #include <glusterfs/locking.h> #include <glusterfs/timer.h> #include "glusterfs3-xdr.h" -#include <glusterfs/hashfn.h> #include "posix-aio.h" #include <glusterfs/glusterfs-acl.h> #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 <glusterfs/common-utils.h> -#include <glusterfs/xlator.h> +#include <stdint.h> + +#include <glusterfs/compat-errno.h> #include <glusterfs/syscall.h> #include <glusterfs/logging.h> #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 <glusterfs/xlator.h> -#include <glusterfs/common-utils.h> #include <glusterfs/compat-errno.h> +#include <stdint.h> // 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 <alloca.h> #endif -#include <glusterfs/common-utils.h> - #include "posix-handle.h" #include "posix.h" -#include <glusterfs/xlator.h> #include <glusterfs/syscall.h> #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 <fnmatch.h> -#include <glusterfs/glusterfs.h> -#include <glusterfs/checksum.h> -#include <glusterfs/dict.h> -#include <glusterfs/logging.h> #include "posix.h" #include "posix-messages.h" #include "posix-metadata.h" #include "posix-handle.h" -#include <glusterfs/xlator.h> -#include <glusterfs/defaults.h> -#include <glusterfs/common-utils.h> #include <glusterfs/compat-errno.h> #include <glusterfs/compat.h> #include <glusterfs/byte-order.h> @@ -52,7 +45,6 @@ #include <glusterfs/locking.h> #include <glusterfs/timer.h> #include "glusterfs3-xdr.h" -#include <glusterfs/hashfn.h> #include <glusterfs/glusterfs-acl.h> #include "posix-gfid-path.h" #include <glusterfs/events.h> 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 <fcntl.h> #endif /* HAVE_LINKAT */ -#include <glusterfs/glusterfs.h> #include <glusterfs/checksum.h> #include <glusterfs/dict.h> #include <glusterfs/logging.h> -#include "posix.h" -#include <glusterfs/xlator.h> -#include <glusterfs/defaults.h> -#include <glusterfs/common-utils.h> +#include "posix-handle.h" #include <glusterfs/compat-errno.h> #include <glusterfs/compat.h> #include <glusterfs/byte-order.h> @@ -53,8 +49,6 @@ #include <glusterfs/locking.h> #include <glusterfs/timer.h> #include "glusterfs3-xdr.h" -#include <glusterfs/hashfn.h> -#include "posix-aio.h" #include <glusterfs/glusterfs-acl.h> #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 <limits.h> #include <sys/types.h> -#include <glusterfs/xlator.h> #include <glusterfs/gf-dirent.h> #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 <sys/extattr.h> #endif -#include <glusterfs/xlator.h> #include <glusterfs/compat.h> #include <glusterfs/timer.h> #include "posix-mem-types.h" -#include "posix-handle.h" #include <glusterfs/call-stub.h> #ifdef HAVE_LIBAIO |