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 /libglusterfs/src/graph.c | |
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 'libglusterfs/src/graph.c')
-rw-r--r-- | libglusterfs/src/graph.c | 34 |
1 files changed, 25 insertions, 9 deletions
diff --git a/libglusterfs/src/graph.c b/libglusterfs/src/graph.c index 437283b7972..cb1c0017cf1 100644 --- a/libglusterfs/src/graph.c +++ b/libglusterfs/src/graph.c @@ -8,16 +8,32 @@ cases as published by the Free Software Foundation. */ -#include "glusterfs/xlator.h" -#include <dlfcn.h> -#include <netdb.h> -#include <fnmatch.h> -#include <stdlib.h> +#include <stdint.h> // for uint32_t +#include <sys/time.h> // for timeval +#include <errno.h> // for EIO, errno, EINVAL, ENOMEM +#include <fnmatch.h> // for fnmatch, FNM_NOESCAPE +#include <openssl/sha.h> // for SHA256_DIGEST_LENGTH +#include <regex.h> // for regmatch_t, regcomp +#include <stdio.h> // for fclose, fopen, snprintf +#include <stdlib.h> // for NULL, atoi, mkstemp +#include <string.h> // for strcmp, strerror, memcpy +#include <strings.h> // for rindex +#include <sys/stat.h> // for stat +#include <sys/time.h> // for gettimeofday +#include <unistd.h> // for gethostname, getpid +#include "glusterfs-fops.h" // for GF_EVENT_GRAPH_NEW, GF_... +#include "glusterfs/common-utils.h" // for gf_strncpy, gf_time_fmt #include "glusterfs/defaults.h" -#include <unistd.h> -#include "glusterfs/syscall.h" -#include <regex.h> -#include "glusterfs/libglusterfs-messages.h" +#include "glusterfs/dict.h" // for dict_foreach, dict_set_... +#include "glusterfs/globals.h" // for xlator_t, xlator_list_t +#include "glusterfs/glusterfs.h" // for glusterfs_graph_t, glus... +#include "glusterfs/libglusterfs-messages.h" // for LG_MSG_GRAPH_ERROR, LG_... +#include "glusterfs/list.h" // for list_add, list_del_init +#include "glusterfs/logging.h" // for gf_msg, GF_LOG_ERROR +#include "glusterfs/mem-pool.h" // for GF_FREE, gf_strdup, GF_... +#include "glusterfs/mem-types.h" // for gf_common_mt_xlator_list_t +#include "glusterfs/options.h" // for xlator_tree_reconfigure +#include "glusterfs/syscall.h" // for sys_close, sys_stat #if 0 static void |