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/cluster/afr/src/afr-common.c | 2 -- xlators/cluster/afr/src/afr-dir-read.c | 7 ------- xlators/cluster/afr/src/afr-dir-write.c | 4 ---- xlators/cluster/afr/src/afr-inode-read.c | 3 --- xlators/cluster/afr/src/afr-inode-write.c | 6 ------ xlators/cluster/afr/src/afr-open.c | 10 ---------- xlators/cluster/dht/src/dht-common.c | 4 +--- xlators/cluster/dht/src/dht-common.h | 2 -- xlators/cluster/dht/src/dht-diskusage.c | 4 ---- xlators/cluster/dht/src/dht-hashfn.c | 2 -- xlators/cluster/dht/src/dht-helper.c | 3 +-- xlators/cluster/dht/src/dht-layout.c | 3 --- xlators/cluster/dht/src/dht-linkfile.c | 3 --- xlators/cluster/dht/src/dht-lock.h | 1 - xlators/cluster/dht/src/dht-rebalance.c | 3 +-- xlators/cluster/dht/src/dht-rename.c | 2 -- xlators/cluster/dht/src/dht-selfheal.c | 3 --- xlators/cluster/dht/src/dht.c | 1 - xlators/cluster/ec/src/ec-common.h | 3 +-- xlators/cluster/ec/src/ec-data.c | 1 - xlators/cluster/ec/src/ec-dir-read.c | 4 ---- xlators/cluster/ec/src/ec-dir-write.c | 3 --- xlators/cluster/ec/src/ec-galois.c | 3 --- xlators/cluster/ec/src/ec-generic.c | 3 --- xlators/cluster/ec/src/ec-heal.c | 2 -- xlators/cluster/ec/src/ec-heald.c | 1 - xlators/cluster/ec/src/ec-heald.h | 6 +++--- xlators/cluster/ec/src/ec-inode-read.c | 3 --- xlators/cluster/ec/src/ec-inode-write.c | 4 ---- xlators/cluster/ec/src/ec-locks.c | 4 ---- xlators/cluster/ec/src/ec-method.h | 2 -- xlators/features/bit-rot/src/bitd/bit-rot.c | 3 --- xlators/features/bit-rot/src/stub/bit-rot-stub.c | 1 - xlators/features/locks/src/common.c | 2 -- xlators/features/locks/src/common.h | 1 - xlators/features/locks/src/inodelk.c | 4 +--- xlators/features/locks/src/posix.c | 4 ---- xlators/features/namespace/src/namespace.c | 1 - xlators/features/quota/src/quota.c | 4 ---- xlators/features/quota/src/quota.h | 3 --- xlators/features/quota/src/quotad.c | 1 - xlators/features/read-only/src/read-only.c | 1 - xlators/features/read-only/src/read-only.h | 5 +++-- xlators/features/snapview-server/src/snapview-server.h | 2 -- xlators/lib/src/libxlator.c | 2 +- xlators/lib/src/libxlator.h | 8 +++++--- xlators/mgmt/glusterd/src/glusterd-sm.h | 3 --- xlators/performance/io-cache/src/io-cache.h | 4 ---- 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 -- xlators/system/posix-acl/src/posix-acl.c | 2 -- xlators/system/posix-acl/src/posix-acl.h | 1 - 61 files changed, 26 insertions(+), 182 deletions(-) (limited to 'xlators') diff --git a/xlators/cluster/afr/src/afr-common.c b/xlators/cluster/afr/src/afr-common.c index 27ee9d5f16b..96f13ce2cee 100644 --- a/xlators/cluster/afr/src/afr-common.c +++ b/xlators/cluster/afr/src/afr-common.c @@ -18,9 +18,7 @@ #include #include "afr.h" #include -#include #include -#include #include #include #include diff --git a/xlators/cluster/afr/src/afr-dir-read.c b/xlators/cluster/afr/src/afr-dir-read.c index e7ba4a5ddcc..f9fd48893ff 100644 --- a/xlators/cluster/afr/src/afr-dir-read.c +++ b/xlators/cluster/afr/src/afr-dir-read.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -18,16 +17,10 @@ #include #include -#include -#include -#include #include -#include -#include #include #include #include -#include #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 84e2a344624..82a72fddd67 100644 --- a/xlators/cluster/afr/src/afr-dir-write.c +++ b/xlators/cluster/afr/src/afr-dir-write.c @@ -10,7 +10,6 @@ #include #include -#include #include #include #include @@ -18,11 +17,8 @@ #include #include "afr.h" #include -#include -#include #include #include -#include #include #include #include diff --git a/xlators/cluster/afr/src/afr-inode-read.c b/xlators/cluster/afr/src/afr-inode-read.c index 523a5b48880..9204add5b15 100644 --- a/xlators/cluster/afr/src/afr-inode-read.c +++ b/xlators/cluster/afr/src/afr-inode-read.c @@ -18,11 +18,8 @@ #include #include "afr.h" #include -#include -#include #include #include -#include #include #include #include diff --git a/xlators/cluster/afr/src/afr-inode-write.c b/xlators/cluster/afr/src/afr-inode-write.c index 7b16c5b0afb..8e9de3e12a6 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 #include -#include #include #include #include @@ -18,11 +16,7 @@ #include #include "afr.h" #include -#include -#include #include -#include -#include #include #include #include diff --git a/xlators/cluster/afr/src/afr-open.c b/xlators/cluster/afr/src/afr-open.c index dd568160521..1747a079fa6 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 #include -#include #include #include #include @@ -18,11 +16,7 @@ #include #include "afr.h" #include -#include -#include #include -#include -#include #include #include #include @@ -30,10 +24,6 @@ #include #include -#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 e1edb380204..04b5f1c2fe6 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 -#include #include "libxlator.h" #include "dht-common.h" #include "dht-lock.h" -#include #include #include #include +#include "glusterfs/compat-errno.h" // for ENODATA on BSD #include #include diff --git a/xlators/cluster/dht/src/dht-common.h b/xlators/cluster/dht/src/dht-common.h index c516271228e..0389b534d5f 100644 --- a/xlators/cluster/dht/src/dht-common.h +++ b/xlators/cluster/dht/src/dht-common.h @@ -9,8 +9,6 @@ */ #include -#include -#include #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 4d3905ab741..27097ca2475 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 -#include #include "dht-common.h" -#include "dht-messages.h" -#include #include #include diff --git a/xlators/cluster/dht/src/dht-hashfn.c b/xlators/cluster/dht/src/dht-hashfn.c index 3def6b17666..c1405edbdd4 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 -#include #include "dht-common.h" #include diff --git a/xlators/cluster/dht/src/dht-helper.c b/xlators/cluster/dht/src/dht-helper.c index 4c57e0d2efc..c7bc8c3aaf2 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 -#include #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 35bd3fbd25e..9cbb0f72171 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 -#include #include "dht-common.h" #include -#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 e17c354bea6..2f4e1813be0 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 -#include #include #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 1cea8ae51ea..6485c03fb6e 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 #include "dht-common.h" void diff --git a/xlators/cluster/dht/src/dht-rebalance.c b/xlators/cluster/dht/src/dht-rebalance.c index 2580dd24ed2..ea63c3c5e74 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 #include -#include #include #include #include +#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 893b4513628..861e2fb4f9f 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 -#include #include "dht-common.h" #include "dht-lock.h" #include diff --git a/xlators/cluster/dht/src/dht-selfheal.c b/xlators/cluster/dht/src/dht-selfheal.c index f5dfff9a11f..b140aad4c69 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 -#include #include "dht-common.h" -#include "dht-messages.h" #include "dht-lock.h" #include diff --git a/xlators/cluster/dht/src/dht.c b/xlators/cluster/dht/src/dht.c index 934eace1ad1..53de8292704 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 #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 bf6c97d6aff..7296091fc90 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 - +#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 8d2d9a1dfa2..06388833546 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 8310d4a1a8c..c3c6b89dba7 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 -#include - #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 0b8ee219f87..bd2544af862 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 -#include - #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 ee7662f52ce..6e4990c71f5 100644 --- a/xlators/cluster/ec/src/ec-galois.c +++ b/xlators/cluster/ec/src/ec-galois.c @@ -10,9 +10,6 @@ #include -#include -#include - #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 acc16b5d80f..6e7bd4bc7b2 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 -#include #include #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 237fea22356..b9fb8686a6d 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 #include #include #include @@ -17,7 +16,6 @@ #include #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 5948a588be1..956e73c2088 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 #include #include #include "ec.h" diff --git a/xlators/cluster/ec/src/ec-heald.h b/xlators/cluster/ec/src/ec-heald.h index 8184cf4147c..6c7da4edc10 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 - -#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 f87a94a1cf7..602c47d3673 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 -#include - #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 ea5514065ea..46f18c8807c 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 -#include - -#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 ffcac074c4d..8e84977d2b3 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 -#include - #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 2489fc84226..f91233b2f88 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 - #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 49528eabf71..6d0c0b5cead 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 -#include -#include -#include #include #include 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 c3f81bcbb7b..e6d64de99a9 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 #include -#include #include #include "changelog.h" #include diff --git a/xlators/features/locks/src/common.c b/xlators/features/locks/src/common.c index ad1ce6c604d..429ce32803e 100644 --- a/xlators/features/locks/src/common.c +++ b/xlators/features/locks/src/common.c @@ -14,9 +14,7 @@ #include #include -#include #include -#include #include #include "locks.h" diff --git a/xlators/features/locks/src/common.h b/xlators/features/locks/src/common.h index 55603ef9c42..4006062606e 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 /*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 95afc902ffa..cf556ea12a2 100644 --- a/xlators/features/locks/src/inodelk.c +++ b/xlators/features/locks/src/inodelk.c @@ -9,16 +9,14 @@ */ #include #include -#include +#include #include -#include #include #include #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 d723d798804..c37752da945 100644 --- a/xlators/features/locks/src/posix.c +++ b/xlators/features/locks/src/posix.c @@ -12,11 +12,8 @@ #include #include -#include #include -#include #include -#include #include "locks.h" #include "common.h" @@ -24,7 +21,6 @@ #include "clear.h" #include #include -#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 59045e8647b..86c5ebee900 100644 --- a/xlators/features/namespace/src/namespace.c +++ b/xlators/features/namespace/src/namespace.c @@ -16,7 +16,6 @@ #include #include -#include #include #include #include "namespace.h" diff --git a/xlators/features/quota/src/quota.c b/xlators/features/quota/src/quota.c index c787028e7b3..c014c99cbd2 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 #include "quota.h" -#include -#include #include -#include #include "quota-messages.h" #include diff --git a/xlators/features/quota/src/quota.h b/xlators/features/quota/src/quota.h index a5a99cac090..00012c22f46 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 #include -#include -#include #include "quota-mem-types.h" #include #include diff --git a/xlators/features/quota/src/quotad.c b/xlators/features/quota/src/quotad.c index 146ec749930..643f25c9c2a 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 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 ac966633c34..48654998e63 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 #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 fc32f82f8c5..aced5d3c577 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 +#include // for uint64_t, uint8_t +#include // 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 42f22404b68..6472422e715 100644 --- a/xlators/features/snapview-server/src/snapview-server.h +++ b/xlators/features/snapview-server/src/snapview-server.h @@ -19,10 +19,8 @@ #include #include #include -#include #include #include "glfs.h" -#include #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 724ceef5f2a..8075fa0c29f 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 + #include "libxlator.h" int marker_xtime_default_gauge[] = { diff --git a/xlators/lib/src/libxlator.h b/xlators/lib/src/libxlator.h index d17a1e21891..81da4060d55 100644 --- a/xlators/lib/src/libxlator.h +++ b/xlators/lib/src/libxlator.h @@ -10,10 +10,12 @@ #ifndef _LIBXLATOR_H #define _LIBXLATOR_H -#include -#include #include -#include + +#include // 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 #include diff --git a/xlators/mgmt/glusterd/src/glusterd-sm.h b/xlators/mgmt/glusterd/src/glusterd-sm.h index ce008ac8dfa..11cbd85b3e3 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 -#include -#include #include #include -//#include "glusterd.h" #include "rpcsvc.h" #include diff --git a/xlators/performance/io-cache/src/io-cache.h b/xlators/performance/io-cache/src/io-cache.h index e99dfa455a2..4303c2fae13 100644 --- a/xlators/performance/io-cache/src/io-cache.h +++ b/xlators/performance/io-cache/src/io-cache.h @@ -15,13 +15,9 @@ #include #include -#include #include -#include -#include #include #include -#include #include #include #include "io-cache-messages.h" 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 diff --git a/xlators/system/posix-acl/src/posix-acl.c b/xlators/system/posix-acl/src/posix-acl.c index bae47bdfcac..cd8d5e53aa1 100644 --- a/xlators/system/posix-acl/src/posix-acl.c +++ b/xlators/system/posix-acl/src/posix-acl.c @@ -10,8 +10,6 @@ #include -#include -#include #include #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 024c402f952..f54a96f058b 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 -#include #include #include -- cgit