summaryrefslogtreecommitdiffstats
path: root/xlators
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2019-06-09 13:31:31 +0300
committerAmar Tumballi <amarts@redhat.com>2019-06-14 16:50:32 +0000
commit0a6fe8551ac9807a8b6ad62241ec8048cf9f9025 (patch)
tree7f6d6b7920ed775c75ca7b4a3dd14aceef5eec38 /xlators
parent65e3624091e895ca32cd91468552589f34d17595 (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')
-rw-r--r--xlators/cluster/afr/src/afr-common.c2
-rw-r--r--xlators/cluster/afr/src/afr-dir-read.c7
-rw-r--r--xlators/cluster/afr/src/afr-dir-write.c4
-rw-r--r--xlators/cluster/afr/src/afr-inode-read.c3
-rw-r--r--xlators/cluster/afr/src/afr-inode-write.c6
-rw-r--r--xlators/cluster/afr/src/afr-open.c10
-rw-r--r--xlators/cluster/dht/src/dht-common.c4
-rw-r--r--xlators/cluster/dht/src/dht-common.h2
-rw-r--r--xlators/cluster/dht/src/dht-diskusage.c4
-rw-r--r--xlators/cluster/dht/src/dht-hashfn.c2
-rw-r--r--xlators/cluster/dht/src/dht-helper.c3
-rw-r--r--xlators/cluster/dht/src/dht-layout.c3
-rw-r--r--xlators/cluster/dht/src/dht-linkfile.c3
-rw-r--r--xlators/cluster/dht/src/dht-lock.h1
-rw-r--r--xlators/cluster/dht/src/dht-rebalance.c3
-rw-r--r--xlators/cluster/dht/src/dht-rename.c2
-rw-r--r--xlators/cluster/dht/src/dht-selfheal.c3
-rw-r--r--xlators/cluster/dht/src/dht.c1
-rw-r--r--xlators/cluster/ec/src/ec-common.h3
-rw-r--r--xlators/cluster/ec/src/ec-data.c1
-rw-r--r--xlators/cluster/ec/src/ec-dir-read.c4
-rw-r--r--xlators/cluster/ec/src/ec-dir-write.c3
-rw-r--r--xlators/cluster/ec/src/ec-galois.c3
-rw-r--r--xlators/cluster/ec/src/ec-generic.c3
-rw-r--r--xlators/cluster/ec/src/ec-heal.c2
-rw-r--r--xlators/cluster/ec/src/ec-heald.c1
-rw-r--r--xlators/cluster/ec/src/ec-heald.h6
-rw-r--r--xlators/cluster/ec/src/ec-inode-read.c3
-rw-r--r--xlators/cluster/ec/src/ec-inode-write.c4
-rw-r--r--xlators/cluster/ec/src/ec-locks.c4
-rw-r--r--xlators/cluster/ec/src/ec-method.h2
-rw-r--r--xlators/features/bit-rot/src/bitd/bit-rot.c3
-rw-r--r--xlators/features/bit-rot/src/stub/bit-rot-stub.c1
-rw-r--r--xlators/features/locks/src/common.c2
-rw-r--r--xlators/features/locks/src/common.h1
-rw-r--r--xlators/features/locks/src/inodelk.c4
-rw-r--r--xlators/features/locks/src/posix.c4
-rw-r--r--xlators/features/namespace/src/namespace.c1
-rw-r--r--xlators/features/quota/src/quota.c4
-rw-r--r--xlators/features/quota/src/quota.h3
-rw-r--r--xlators/features/quota/src/quotad.c1
-rw-r--r--xlators/features/read-only/src/read-only.c1
-rw-r--r--xlators/features/read-only/src/read-only.h5
-rw-r--r--xlators/features/snapview-server/src/snapview-server.h2
-rw-r--r--xlators/lib/src/libxlator.c2
-rw-r--r--xlators/lib/src/libxlator.h8
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-sm.h3
-rw-r--r--xlators/performance/io-cache/src/io-cache.h4
-rw-r--r--xlators/storage/posix/src/posix-aio.c2
-rw-r--r--xlators/storage/posix/src/posix-aio.h3
-rw-r--r--xlators/storage/posix/src/posix-common.c9
-rw-r--r--xlators/storage/posix/src/posix-entry-ops.c6
-rw-r--r--xlators/storage/posix/src/posix-gfid-path.c5
-rw-r--r--xlators/storage/posix/src/posix-gfid-path.h7
-rw-r--r--xlators/storage/posix/src/posix-handle.c3
-rw-r--r--xlators/storage/posix/src/posix-helpers.c8
-rw-r--r--xlators/storage/posix/src/posix-inode-fd-ops.c8
-rw-r--r--xlators/storage/posix/src/posix-inode-handle.h1
-rw-r--r--xlators/storage/posix/src/posix.h2
-rw-r--r--xlators/system/posix-acl/src/posix-acl.c2
-rw-r--r--xlators/system/posix-acl/src/posix-acl.h1
61 files changed, 26 insertions, 182 deletions
diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c
index 27ee9d5..96f13ce 100644
--- a/xlators/cluster/afr/src/afr-common.c
+++ b/xlators/cluster/afr/src/afr-common.c
@@ -18,9 +18,7 @@
#include <glusterfs/glusterfs.h>
#include "afr.h"
#include <glusterfs/dict.h>
-#include <glusterfs/xlator.h>
#include <glusterfs/hashfn.h>
-#include <glusterfs/logging.h>
#include <glusterfs/list.h>
#include <glusterfs/call-stub.h>
#include <glusterfs/defaults.h>
diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c
index e7ba4a5..f9fd488 100644
--- a/xlators/cluster/afr/src/afr-dir-read.c
+++ b/xlators/cluster/afr/src/afr-dir-read.c
@@ -10,7 +10,6 @@
#include <libgen.h>
#include <unistd.h>
-#include <fnmatch.h>
#include <sys/time.h>
#include <stdlib.h>
#include <signal.h>
@@ -18,16 +17,10 @@
#include <glusterfs/glusterfs.h>
#include <glusterfs/dict.h>
-#include <glusterfs/xlator.h>
-#include <glusterfs/hashfn.h>
-#include <glusterfs/logging.h>
#include <glusterfs/list.h>
-#include <glusterfs/call-stub.h>
-#include <glusterfs/defaults.h>
#include <glusterfs/common-utils.h>
#include <glusterfs/compat-errno.h>
#include <glusterfs/compat.h>
-#include <glusterfs/checksum.h>
#include "afr.h"
#include "afr-transaction.h"
diff --git a/xlators/cluster/afr/src/afr-dir-write.c b/xlators/cluster/afr/src/afr-dir-write.c
index 84e2a34..82a72fd 100644
--- a/xlators/cluster/afr/src/afr-dir-write.c
+++ b/xlators/cluster/afr/src/afr-dir-write.c
@@ -10,7 +10,6 @@
#include <libgen.h>
#include <unistd.h>
-#include <fnmatch.h>
#include <sys/time.h>
#include <stdlib.h>
#include <signal.h>
@@ -18,11 +17,8 @@
#include <glusterfs/glusterfs.h>
#include "afr.h"
#include <glusterfs/dict.h>
-#include <glusterfs/xlator.h>
-#include <glusterfs/hashfn.h>
#include <glusterfs/logging.h>
#include <glusterfs/list.h>
-#include <glusterfs/call-stub.h>
#include <glusterfs/defaults.h>
#include <glusterfs/common-utils.h>
#include <glusterfs/compat-errno.h>
diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c
index 523a5b4..9204add 100644
--- a/xlators/cluster/afr/src/afr-inode-read.c
+++ b/xlators/cluster/afr/src/afr-inode-read.c
@@ -18,11 +18,8 @@
#include <glusterfs/glusterfs.h>
#include "afr.h"
#include <glusterfs/dict.h>
-#include <glusterfs/xlator.h>
-#include <glusterfs/hashfn.h>
#include <glusterfs/logging.h>
#include <glusterfs/list.h>
-#include <glusterfs/call-stub.h>
#include <glusterfs/byte-order.h>
#include <glusterfs/defaults.h>
#include <glusterfs/common-utils.h>
diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c
index 7b16c5b..8e9de3e 100644
--- a/xlators/cluster/afr/src/afr-inode-write.c
+++ b/xlators/cluster/afr/src/afr-inode-write.c
@@ -8,9 +8,7 @@
cases as published by the Free Software Foundation.
*/
-#include <libgen.h>
#include <unistd.h>
-#include <fnmatch.h>
#include <sys/time.h>
#include <stdlib.h>
#include <signal.h>
@@ -18,11 +16,7 @@
#include <glusterfs/glusterfs.h>
#include "afr.h"
#include <glusterfs/dict.h>
-#include <glusterfs/xlator.h>
-#include <glusterfs/hashfn.h>
#include <glusterfs/logging.h>
-#include <glusterfs/list.h>
-#include <glusterfs/call-stub.h>
#include <glusterfs/defaults.h>
#include <glusterfs/common-utils.h>
#include <glusterfs/compat-errno.h>
diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c
index dd56816..1747a07 100644
--- a/xlators/cluster/afr/src/afr-open.c
+++ b/xlators/cluster/afr/src/afr-open.c
@@ -8,9 +8,7 @@
cases as published by the Free Software Foundation.
*/
-#include <libgen.h>
#include <unistd.h>
-#include <fnmatch.h>
#include <sys/time.h>
#include <stdlib.h>
#include <signal.h>
@@ -18,11 +16,7 @@
#include <glusterfs/glusterfs.h>
#include "afr.h"
#include <glusterfs/dict.h>
-#include <glusterfs/xlator.h>
-#include <glusterfs/hashfn.h>
#include <glusterfs/logging.h>
-#include <glusterfs/list.h>
-#include <glusterfs/call-stub.h>
#include <glusterfs/defaults.h>
#include <glusterfs/common-utils.h>
#include <glusterfs/compat-errno.h>
@@ -30,10 +24,6 @@
#include <glusterfs/byte-order.h>
#include <glusterfs/statedump.h>
-#include "afr-inode-read.h"
-#include "afr-inode-write.h"
-#include "afr-dir-read.h"
-#include "afr-dir-write.h"
#include "afr-transaction.h"
gf_boolean_t
diff --git a/xlators/cluster/dht/src/dht-common.c b/xlators/cluster/dht/src/dht-common.c
index e1edb38..04b5f1c 100644
--- a/xlators/cluster/dht/src/dht-common.c
+++ b/xlators/cluster/dht/src/dht-common.c
@@ -10,15 +10,13 @@
/* TODO: add NS locking */
-#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
#include "libxlator.h"
#include "dht-common.h"
#include "dht-lock.h"
-#include <glusterfs/defaults.h>
#include <glusterfs/byte-order.h>
#include <glusterfs/quota-common-utils.h>
#include <glusterfs/upcall-utils.h>
+#include "glusterfs/compat-errno.h" // for ENODATA on BSD
#include <sys/time.h>
#include <libgen.h>
diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h
index c516271..0389b53 100644
--- a/xlators/cluster/dht/src/dht-common.h
+++ b/xlators/cluster/dht/src/dht-common.h
@@ -9,8 +9,6 @@
*/
#include <regex.h>
-#include <signal.h>
-#include <fnmatch.h>
#include "dht-mem-types.h"
#include "dht-messages.h"
diff --git a/xlators/cluster/dht/src/dht-diskusage.c b/xlators/cluster/dht/src/dht-diskusage.c
index 4d3905a..27097ca 100644
--- a/xlators/cluster/dht/src/dht-diskusage.c
+++ b/xlators/cluster/dht/src/dht-diskusage.c
@@ -10,11 +10,7 @@
/* TODO: add NS locking */
-#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
#include "dht-common.h"
-#include "dht-messages.h"
-#include <glusterfs/defaults.h>
#include <sys/time.h>
#include <glusterfs/events.h>
diff --git a/xlators/cluster/dht/src/dht-hashfn.c b/xlators/cluster/dht/src/dht-hashfn.c
index 3def6b1..c1405ed 100644
--- a/xlators/cluster/dht/src/dht-hashfn.c
+++ b/xlators/cluster/dht/src/dht-hashfn.c
@@ -8,8 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
#include "dht-common.h"
#include <glusterfs/hashfn.h>
diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c
index 4c57e0d..c7bc8c3 100644
--- a/xlators/cluster/dht/src/dht-helper.c
+++ b/xlators/cluster/dht/src/dht-helper.c
@@ -8,10 +8,9 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
#include "dht-common.h"
#include "dht-lock.h"
+#include "glusterfs/compat-errno.h" // for ENODATA on BSD
static void
dht_free_fd_ctx(dht_fd_ctx_t *fd_ctx)
diff --git a/xlators/cluster/dht/src/dht-layout.c b/xlators/cluster/dht/src/dht-layout.c
index 35bd3fb..9cbb0f7 100644
--- a/xlators/cluster/dht/src/dht-layout.c
+++ b/xlators/cluster/dht/src/dht-layout.c
@@ -8,11 +8,8 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
#include "dht-common.h"
#include <glusterfs/byte-order.h>
-#include "dht-messages.h"
#include "unittest/unittest.h"
#define layout_base_size (sizeof(dht_layout_t))
diff --git a/xlators/cluster/dht/src/dht-linkfile.c b/xlators/cluster/dht/src/dht-linkfile.c
index e17c354..2f4e181 100644
--- a/xlators/cluster/dht/src/dht-linkfile.c
+++ b/xlators/cluster/dht/src/dht-linkfile.c
@@ -8,11 +8,8 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
#include <glusterfs/compat.h>
#include "dht-common.h"
-#include "dht-messages.h"
int
dht_linkfile_lookup_cbk(call_frame_t *frame, void *cookie, xlator_t *this,
diff --git a/xlators/cluster/dht/src/dht-lock.h b/xlators/cluster/dht/src/dht-lock.h
index 1cea8ae..6485c03 100644
--- a/xlators/cluster/dht/src/dht-lock.h
+++ b/xlators/cluster/dht/src/dht-lock.h
@@ -11,7 +11,6 @@
#ifndef _DHT_LOCK_H
#define _DHT_LOCK_H
-#include <glusterfs/xlator.h>
#include "dht-common.h"
void
diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c
index 2580dd2..ea63c3c 100644
--- a/xlators/cluster/dht/src/dht-rebalance.c
+++ b/xlators/cluster/dht/src/dht-rebalance.c
@@ -9,12 +9,11 @@
*/
#include "dht-common.h"
-#include <glusterfs/xlator.h>
#include <glusterfs/syscall.h>
-#include <signal.h>
#include <fnmatch.h>
#include <signal.h>
#include <glusterfs/events.h>
+#include "glusterfs/compat-errno.h" // for ENODATA on BSD
#define GF_DISK_SECTOR_SIZE 512
#define DHT_REBALANCE_PID 4242 /* Change it if required */
diff --git a/xlators/cluster/dht/src/dht-rename.c b/xlators/cluster/dht/src/dht-rename.c
index 893b451..861e2fb 100644
--- a/xlators/cluster/dht/src/dht-rename.c
+++ b/xlators/cluster/dht/src/dht-rename.c
@@ -11,8 +11,6 @@
/* TODO: link(oldpath, newpath) fails if newpath already exists. DHT should
* delete the newpath if it gets EEXISTS from link() call.
*/
-#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
#include "dht-common.h"
#include "dht-lock.h"
#include <glusterfs/defaults.h>
diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c
index f5dfff9..b140aad 100644
--- a/xlators/cluster/dht/src/dht-selfheal.c
+++ b/xlators/cluster/dht/src/dht-selfheal.c
@@ -8,10 +8,7 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
#include "dht-common.h"
-#include "dht-messages.h"
#include "dht-lock.h"
#include <glusterfs/glusterfs-acl.h>
diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c
index 934eace..53de829 100644
--- a/xlators/cluster/dht/src/dht.c
+++ b/xlators/cluster/dht/src/dht.c
@@ -8,7 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/statedump.h>
#include "dht-common.h"
struct xlator_fops dht_pt_fops = {
diff --git a/xlators/cluster/ec/src/ec-common.h b/xlators/cluster/ec/src/ec-common.h
index bf6c97d..7296091 100644
--- a/xlators/cluster/ec/src/ec-common.h
+++ b/xlators/cluster/ec/src/ec-common.h
@@ -11,8 +11,7 @@
#ifndef __EC_COMMON_H__
#define __EC_COMMON_H__
-#include <glusterfs/xlator.h>
-
+#include "glusterfs/compat-errno.h" // for ENODATA on BSD
#include "ec-data.h"
typedef enum { EC_DATA_TXN, EC_METADATA_TXN } ec_txn_t;
diff --git a/xlators/cluster/ec/src/ec-data.c b/xlators/cluster/ec/src/ec-data.c
index 8d2d9a1..0638883 100644
--- a/xlators/cluster/ec/src/ec-data.c
+++ b/xlators/cluster/ec/src/ec-data.c
@@ -8,7 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#include "ec-mem-types.h"
#include "ec-helpers.h"
#include "ec-common.h"
#include "ec-data.h"
diff --git a/xlators/cluster/ec/src/ec-dir-read.c b/xlators/cluster/ec/src/ec-dir-read.c
index 8310d4a..c3c6b89 100644
--- a/xlators/cluster/ec/src/ec-dir-read.c
+++ b/xlators/cluster/ec/src/ec-dir-read.c
@@ -8,15 +8,11 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/xlator.h>
-#include <glusterfs/defaults.h>
-
#include "ec.h"
#include "ec-messages.h"
#include "ec-helpers.h"
#include "ec-common.h"
#include "ec-combine.h"
-#include "ec-method.h"
#include "ec-fops.h"
/****************************************************************
diff --git a/xlators/cluster/ec/src/ec-dir-write.c b/xlators/cluster/ec/src/ec-dir-write.c
index 0b8ee21..bd2544a 100644
--- a/xlators/cluster/ec/src/ec-dir-write.c
+++ b/xlators/cluster/ec/src/ec-dir-write.c
@@ -8,9 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/xlator.h>
-#include <glusterfs/defaults.h>
-
#include "ec.h"
#include "ec-messages.h"
#include "ec-helpers.h"
diff --git a/xlators/cluster/ec/src/ec-galois.c b/xlators/cluster/ec/src/ec-galois.c
index ee7662f..6e4990c 100644
--- a/xlators/cluster/ec/src/ec-galois.c
+++ b/xlators/cluster/ec/src/ec-galois.c
@@ -10,9 +10,6 @@
#include <string.h>
-#include <glusterfs/mem-pool.h>
-#include <glusterfs/list.h>
-
#include "ec-mem-types.h"
#include "ec-gf8.h"
#include "ec-helpers.h"
diff --git a/xlators/cluster/ec/src/ec-generic.c b/xlators/cluster/ec/src/ec-generic.c
index acc16b5..6e7bd4b 100644
--- a/xlators/cluster/ec/src/ec-generic.c
+++ b/xlators/cluster/ec/src/ec-generic.c
@@ -8,8 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/xlator.h>
-#include <glusterfs/defaults.h>
#include <glusterfs/byte-order.h>
#include "ec.h"
@@ -17,7 +15,6 @@
#include "ec-helpers.h"
#include "ec-common.h"
#include "ec-combine.h"
-#include "ec-method.h"
#include "ec-fops.h"
/* FOP: flush */
diff --git a/xlators/cluster/ec/src/ec-heal.c b/xlators/cluster/ec/src/ec-heal.c
index 237fea2..b9fb868 100644
--- a/xlators/cluster/ec/src/ec-heal.c
+++ b/xlators/cluster/ec/src/ec-heal.c
@@ -8,7 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/xlator.h>
#include <glusterfs/defaults.h>
#include <glusterfs/compat-errno.h>
#include <glusterfs/byte-order.h>
@@ -17,7 +16,6 @@
#include <glusterfs/cluster-syncop.h>
#include "ec.h"
-#include "ec-mem-types.h"
#include "ec-types.h"
#include "ec-messages.h"
#include "ec-helpers.h"
diff --git a/xlators/cluster/ec/src/ec-heald.c b/xlators/cluster/ec/src/ec-heald.c
index 5948a58..956e73c 100644
--- a/xlators/cluster/ec/src/ec-heald.c
+++ b/xlators/cluster/ec/src/ec-heald.c
@@ -8,7 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/xlator.h>
#include <glusterfs/defaults.h>
#include <glusterfs/compat-errno.h>
#include "ec.h"
diff --git a/xlators/cluster/ec/src/ec-heald.h b/xlators/cluster/ec/src/ec-heald.h
index 8184cf4..6c7da4e 100644
--- a/xlators/cluster/ec/src/ec-heald.h
+++ b/xlators/cluster/ec/src/ec-heald.h
@@ -11,9 +11,9 @@
#ifndef __EC_HEALD_H__
#define __EC_HEALD_H__
-#include <glusterfs/xlator.h>
-
-#include "ec-types.h"
+#include "ec-types.h" // for ec_t
+#include "glusterfs/dict.h" // for dict_t
+#include "glusterfs/globals.h" // for xlator_t
int
ec_xl_op(xlator_t *this, dict_t *input, dict_t *output);
diff --git a/xlators/cluster/ec/src/ec-inode-read.c b/xlators/cluster/ec/src/ec-inode-read.c
index f87a94a..602c47d 100644
--- a/xlators/cluster/ec/src/ec-inode-read.c
+++ b/xlators/cluster/ec/src/ec-inode-read.c
@@ -8,9 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/xlator.h>
-#include <glusterfs/defaults.h>
-
#include "ec.h"
#include "ec-messages.h"
#include "ec-helpers.h"
diff --git a/xlators/cluster/ec/src/ec-inode-write.c b/xlators/cluster/ec/src/ec-inode-write.c
index ea55140..46f18c8 100644
--- a/xlators/cluster/ec/src/ec-inode-write.c
+++ b/xlators/cluster/ec/src/ec-inode-write.c
@@ -8,10 +8,6 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/xlator.h>
-#include <glusterfs/defaults.h>
-
-#include "ec.h"
#include "ec-messages.h"
#include "ec-helpers.h"
#include "ec-common.h"
diff --git a/xlators/cluster/ec/src/ec-locks.c b/xlators/cluster/ec/src/ec-locks.c
index ffcac07..8e84977 100644
--- a/xlators/cluster/ec/src/ec-locks.c
+++ b/xlators/cluster/ec/src/ec-locks.c
@@ -8,13 +8,9 @@
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/xlator.h>
-#include <glusterfs/defaults.h>
-
#include "ec-helpers.h"
#include "ec-common.h"
#include "ec-combine.h"
-#include "ec-method.h"
#include "ec-fops.h"
#include "ec-messages.h"
diff --git a/xlators/cluster/ec/src/ec-method.h b/xlators/cluster/ec/src/ec-method.h
index 2489fc8..f91233b 100644
--- a/xlators/cluster/ec/src/ec-method.h
+++ b/xlators/cluster/ec/src/ec-method.h
@@ -11,8 +11,6 @@
#ifndef __EC_METHOD_H__
#define __EC_METHOD_H__
-#include <glusterfs/xlator.h>
-
#include "ec-types.h"
#include "ec-galois.h"
diff --git a/xlators/features/bit-rot/src/bitd/bit-rot.c b/xlators/features/bit-rot/src/bitd/bit-rot.c
index 49528ea..6d0c0b5 100644
--- a/xlators/features/bit-rot/src/bitd/bit-rot.c
+++ b/xlators/features/bit-rot/src/bitd/bit-rot.c
@@ -9,10 +9,7 @@
*/
#include <ctype.h>
-#include <sys/uio.h>
-#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
#include <glusterfs/logging.h>
#include <glusterfs/compat-errno.h>
diff --git a/xlators/features/bit-rot/src/stub/bit-rot-stub.c b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
index c3f81bc..e6d64de 100644
--- a/xlators/features/bit-rot/src/stub/bit-rot-stub.c
+++ b/xlators/features/bit-rot/src/stub/bit-rot-stub.c
@@ -13,7 +13,6 @@
#include <signal.h>
#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
#include <glusterfs/logging.h>
#include "changelog.h"
#include <glusterfs/compat-errno.h>
diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c
index ad1ce6c..429ce32 100644
--- a/xlators/features/locks/src/common.c
+++ b/xlators/features/locks/src/common.c
@@ -14,9 +14,7 @@
#include <glusterfs/glusterfs.h>
#include <glusterfs/compat.h>
-#include <glusterfs/xlator.h>
#include <glusterfs/logging.h>
-#include <glusterfs/common-utils.h>
#include <glusterfs/syncop.h>
#include "locks.h"
diff --git a/xlators/features/locks/src/common.h b/xlators/features/locks/src/common.h
index 55603ef..4006062 100644
--- a/xlators/features/locks/src/common.h
+++ b/xlators/features/locks/src/common.h
@@ -10,7 +10,6 @@
#ifndef __COMMON_H__
#define __COMMON_H__
-#include <glusterfs/lkowner.h>
/*dump locks format strings */
#define RANGE_FMT "type=%s, whence=%hd, start=%llu, len=%llu"
#define ENTRY_FMT "type=%s on basename=%s"
diff --git a/xlators/features/locks/src/inodelk.c b/xlators/features/locks/src/inodelk.c
index 95afc90..cf556ea 100644
--- a/xlators/features/locks/src/inodelk.c
+++ b/xlators/features/locks/src/inodelk.c
@@ -9,16 +9,14 @@
*/
#include <glusterfs/glusterfs.h>
#include <glusterfs/compat.h>
-#include <glusterfs/xlator.h>
+#include <glusterfs/dict.h>
#include <glusterfs/logging.h>
-#include <glusterfs/common-utils.h>
#include <glusterfs/list.h>
#include <glusterfs/upcall-utils.h>
#include "locks.h"
#include "clear.h"
#include "common.h"
-#include "pl-messages.h"
void
__delete_inode_lock(pl_inode_lock_t *lock)
diff --git a/xlators/features/locks/src/posix.c b/xlators/features/locks/src/posix.c
index d723d79..c37752d 100644
--- a/xlators/features/locks/src/posix.c
+++ b/xlators/features/locks/src/posix.c
@@ -12,11 +12,8 @@
#include <limits.h>
#include <pthread.h>
-#include <glusterfs/glusterfs.h>
#include <glusterfs/compat.h>
-#include <glusterfs/xlator.h>
#include <glusterfs/logging.h>
-#include <glusterfs/common-utils.h>
#include "locks.h"
#include "common.h"
@@ -24,7 +21,6 @@
#include "clear.h"
#include <glusterfs/defaults.h>
#include <glusterfs/syncop.h>
-#include "pl-messages.h"
#ifndef LLONG_MAX
#define LLONG_MAX LONG_LONG_MAX /* compat with old gcc */
diff --git a/xlators/features/namespace/src/namespace.c b/xlators/features/namespace/src/namespace.c
index 59045e8..86c5ebe 100644
--- a/xlators/features/namespace/src/namespace.c
+++ b/xlators/features/namespace/src/namespace.c
@@ -16,7 +16,6 @@
#include <sys/types.h>
#include <glusterfs/defaults.h>
-#include <glusterfs/glusterfs.h>
#include <glusterfs/hashfn.h>
#include <glusterfs/logging.h>
#include "namespace.h"
diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c
index c787028..c014c99 100644
--- a/xlators/features/quota/src/quota.c
+++ b/xlators/features/quota/src/quota.c
@@ -7,13 +7,9 @@
later), or the GNU General Public License, version 2 (GPLv2), in all
cases as published by the Free Software Foundation.
*/
-#include <fnmatch.h>
#include "quota.h"
-#include <glusterfs/common-utils.h>
-#include <glusterfs/defaults.h>
#include <glusterfs/statedump.h>
-#include <glusterfs/quota-common-utils.h>
#include "quota-messages.h"
#include <glusterfs/events.h>
diff --git a/xlators/features/quota/src/quota.h b/xlators/features/quota/src/quota.h
index a5a99ca..00012c2 100644
--- a/xlators/features/quota/src/quota.h
+++ b/xlators/features/quota/src/quota.h
@@ -10,10 +10,7 @@
#ifndef _QUOTA_H
#define _QUOTA_H
-#include <glusterfs/xlator.h>
#include <glusterfs/call-stub.h>
-#include <glusterfs/defaults.h>
-#include <glusterfs/common-utils.h>
#include "quota-mem-types.h"
#include <glusterfs/glusterfs.h>
#include <glusterfs/compat.h>
diff --git a/xlators/features/quota/src/quotad.c b/xlators/features/quota/src/quotad.c
index 146ec74..643f25c 100644
--- a/xlators/features/quota/src/quotad.c
+++ b/xlators/features/quota/src/quotad.c
@@ -9,7 +9,6 @@
*/
#include "quota.h"
#include "quotad-aggregator.h"
-#include <glusterfs/common-utils.h>
int
qd_notify(xlator_t *this, int32_t event, void *data, ...)
diff --git a/xlators/features/read-only/src/read-only.c b/xlators/features/read-only/src/read-only.c
index ac96663..4865499 100644
--- a/xlators/features/read-only/src/read-only.c
+++ b/xlators/features/read-only/src/read-only.c
@@ -7,7 +7,6 @@
later), or the GNU General Public License, version 2 (GPLv2), in all
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/defaults.h>
#include "read-only-common.h"
#include "read-only-mem-types.h"
#include "read-only.h"
diff --git a/xlators/features/read-only/src/read-only.h b/xlators/features/read-only/src/read-only.h
index fc32f82..aced5d3 100644
--- a/xlators/features/read-only/src/read-only.h
+++ b/xlators/features/read-only/src/read-only.h
@@ -11,8 +11,9 @@
#ifndef __READONLY_H__
#define __READONLY_H__
-#include "read-only-mem-types.h"
-#include <glusterfs/xlator.h>
+#include <stdint.h> // for uint64_t, uint8_t
+#include <sys/time.h> // for time_t
+#include "glusterfs/glusterfs.h" // for gf_boolean_t
typedef struct {
uint8_t worm : 1;
diff --git a/xlators/features/snapview-server/src/snapview-server.h b/xlators/features/snapview-server/src/snapview-server.h
index 42f2240..6472422 100644
--- a/xlators/features/snapview-server/src/snapview-server.h
+++ b/xlators/features/snapview-server/src/snapview-server.h
@@ -19,10 +19,8 @@
#include <ctype.h>
#include <sys/uio.h>
#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
#include <glusterfs/logging.h>
#include "glfs.h"
-#include <glusterfs/common-utils.h>
#include "glfs-handles.h"
#include "glfs-internal.h"
#include "glusterfs3-xdr.h"
diff --git a/xlators/lib/src/libxlator.c b/xlators/lib/src/libxlator.c
index 724ceef..8075fa0 100644
--- a/xlators/lib/src/libxlator.c
+++ b/xlators/lib/src/libxlator.c
@@ -7,7 +7,7 @@
later), or the GNU General Public License, version 2 (GPLv2), in all
cases as published by the Free Software Foundation.
*/
-#include <glusterfs/mem-types.h>
+
#include "libxlator.h"
int marker_xtime_default_gauge[] = {
diff --git a/xlators/lib/src/libxlator.h b/xlators/lib/src/libxlator.h
index d17a1e2..81da406 100644
--- a/xlators/lib/src/libxlator.h
+++ b/xlators/lib/src/libxlator.h
@@ -10,10 +10,12 @@
#ifndef _LIBXLATOR_H
#define _LIBXLATOR_H
-#include <glusterfs/xlator.h>
-#include <glusterfs/logging.h>
#include <glusterfs/defaults.h>
-#include <glusterfs/common-utils.h>
+
+#include <stdint.h> // for int32_t
+#include "glusterfs/dict.h" // for dict_t, data_t
+#include "glusterfs/globals.h" // for xlator_t, loc_t
+#include "glusterfs/stack.h" // for call_frame_t
#include <glusterfs/compat.h>
#include <glusterfs/compat-errno.h>
diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.h b/xlators/mgmt/glusterd/src/glusterd-sm.h
index ce008ac..11cbd85 100644
--- a/xlators/mgmt/glusterd/src/glusterd-sm.h
+++ b/xlators/mgmt/glusterd/src/glusterd-sm.h
@@ -15,11 +15,8 @@
#include "rpc-clnt.h"
#include <glusterfs/glusterfs.h>
-#include <glusterfs/xlator.h>
-#include <glusterfs/logging.h>
#include <glusterfs/call-stub.h>
#include <glusterfs/byte-order.h>
-//#include "glusterd.h"
#include "rpcsvc.h"
#include <glusterfs/store.h>
diff --git a/xlators/performance/io-cache/src/io-cache.h b/xlators/performance/io-cache/src/io-cache.h
index e99dfa4..4303c2f 100644
--- a/xlators/performance/io-cache/src/io-cache.h
+++ b/xlators/performance/io-cache/src/io-cache.h
@@ -15,13 +15,9 @@
#include <glusterfs/compat-errno.h>
#include <glusterfs/glusterfs.h>
-#include <glusterfs/logging.h>
#include <glusterfs/dict.h>
-#include <glusterfs/xlator.h>
-#include <glusterfs/common-utils.h>
#include <glusterfs/call-stub.h>
#include <glusterfs/rbthash.h>
-#include <glusterfs/hashfn.h>
#include <sys/time.h>
#include <fnmatch.h>
#include "io-cache-messages.h"
diff --git a/xlators/storage/posix/src/posix-aio.c b/xlators/storage/posix/src/posix-aio.c
index 971ace9..d0cb000 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 d2589bf..b316deb 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 31dc949..a2b9425 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 0b612dc..aab88f0 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 64b5c6c..d7ba324 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 323f114..63b2a8c 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 dac55e1..4764c47 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 bab79f4..686b0be 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 8beb80d..e3b2692 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 2009421..78a85b3 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 02e7003..da590b5 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
diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c
index bae47bd..cd8d5e5 100644
--- a/xlators/system/posix-acl/src/posix-acl.c
+++ b/xlators/system/posix-acl/src/posix-acl.c
@@ -10,8 +10,6 @@
#include <errno.h>
-#include <glusterfs/xlator.h>
-#include <glusterfs/glusterfs.h>
#include <glusterfs/defaults.h>
#include "posix-acl.h"
diff --git a/xlators/system/posix-acl/src/posix-acl.h b/xlators/system/posix-acl/src/posix-acl.h
index 024c402..f54a96f 100644
--- a/xlators/system/posix-acl/src/posix-acl.h
+++ b/xlators/system/posix-acl/src/posix-acl.h
@@ -12,7 +12,6 @@
#define _POSIX_ACL_H
#include <glusterfs/xlator.h>
-#include <glusterfs/common-utils.h>
#include <glusterfs/byte-order.h>
#include <glusterfs/glusterfs-acl.h>