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/cluster/dht/src | |
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/cluster/dht/src')
-rw-r--r-- | xlators/cluster/dht/src/dht-common.c | 4 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-common.h | 2 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-diskusage.c | 4 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-hashfn.c | 2 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-helper.c | 3 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-layout.c | 3 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-linkfile.c | 3 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-lock.h | 1 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-rebalance.c | 3 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-rename.c | 2 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht-selfheal.c | 3 | ||||
-rw-r--r-- | xlators/cluster/dht/src/dht.c | 1 |
12 files changed, 3 insertions, 28 deletions
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 <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 c516271228e..0389b534d5f 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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <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 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 <glusterfs/statedump.h> #include "dht-common.h" struct xlator_fops dht_pt_fops = { |