diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2019-06-09 13:31:31 +0300 |
---|---|---|
committer | gluster-ant <bugzilla-bot@gluster.org> | 2019-06-09 13:31:31 +0300 |
commit | 1ccf7b423da3698ffe490a76f518b0ce463379f0 (patch) | |
tree | 7f6d6b7920ed775c75ca7b4a3dd14aceef5eec38 /rpc | |
parent | e542d08bd07c5a36e38f7818fab08eeb7afcbaee (diff) | |
download | glusterfs-1ccf7b423da3698ffe490a76f518b0ce463379f0.tar.gz glusterfs-1ccf7b423da3698ffe490a76f518b0ce463379f0.tar.xz glusterfs-1ccf7b423da3698ffe490a76f518b0ce463379f0.zip |
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 'rpc')
-rw-r--r-- | rpc/rpc-lib/src/auth-glusterfs.c | 1 | ||||
-rw-r--r-- | rpc/rpc-lib/src/auth-null.c | 1 | ||||
-rw-r--r-- | rpc/rpc-lib/src/auth-unix.c | 1 | ||||
-rw-r--r-- | rpc/rpc-lib/src/mgmt-pmap.c | 1 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt-ping.h | 1 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpc-drc.c | 2 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpc-transport.c | 4 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc-auth.c | 1 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc-common.h | 3 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.c | 4 | ||||
-rw-r--r-- | rpc/rpc-lib/src/rpcsvc.h | 6 | ||||
-rw-r--r-- | rpc/rpc-lib/src/xdr-rpc.c | 4 | ||||
-rw-r--r-- | rpc/rpc-lib/src/xdr-rpc.h | 1 | ||||
-rw-r--r-- | rpc/rpc-lib/src/xdr-rpcclnt.c | 4 | ||||
-rw-r--r-- | rpc/rpc-lib/src/xdr-rpcclnt.h | 2 | ||||
-rw-r--r-- | rpc/rpc-transport/socket/src/socket.c | 5 | ||||
-rw-r--r-- | rpc/rpc-transport/socket/src/socket.h | 5 |
17 files changed, 1 insertions, 45 deletions
diff --git a/rpc/rpc-lib/src/auth-glusterfs.c b/rpc/rpc-lib/src/auth-glusterfs.c index fe5fe03076..69a96f7512 100644 --- a/rpc/rpc-lib/src/auth-glusterfs.c +++ b/rpc/rpc-lib/src/auth-glusterfs.c @@ -9,7 +9,6 @@ */ #include "rpcsvc.h" -#include <glusterfs/list.h> #include <glusterfs/dict.h> #include "xdr-rpc.h" #include "xdr-common.h" diff --git a/rpc/rpc-lib/src/auth-null.c b/rpc/rpc-lib/src/auth-null.c index 820a2c0395..6d059b9da5 100644 --- a/rpc/rpc-lib/src/auth-null.c +++ b/rpc/rpc-lib/src/auth-null.c @@ -9,7 +9,6 @@ */ #include "rpcsvc.h" -#include <glusterfs/list.h> #include <glusterfs/dict.h> int diff --git a/rpc/rpc-lib/src/auth-unix.c b/rpc/rpc-lib/src/auth-unix.c index cacb1ff800..61d475a5e8 100644 --- a/rpc/rpc-lib/src/auth-unix.c +++ b/rpc/rpc-lib/src/auth-unix.c @@ -9,7 +9,6 @@ */ #include "rpcsvc.h" -#include <glusterfs/list.h> #include <glusterfs/dict.h> #include "xdr-rpc.h" diff --git a/rpc/rpc-lib/src/mgmt-pmap.c b/rpc/rpc-lib/src/mgmt-pmap.c index 15f2b61cd0..25a7148e5a 100644 --- a/rpc/rpc-lib/src/mgmt-pmap.c +++ b/rpc/rpc-lib/src/mgmt-pmap.c @@ -12,7 +12,6 @@ #include "protocol-common.h" #include "rpc-clnt.h" #include "xdr-generic.h" -#include <glusterfs/xlator.h> /* Defining a minimal RPC client program for portmap signout */ diff --git a/rpc/rpc-lib/src/rpc-clnt-ping.h b/rpc/rpc-lib/src/rpc-clnt-ping.h index fcbac6f9e2..e5466a828c 100644 --- a/rpc/rpc-lib/src/rpc-clnt-ping.h +++ b/rpc/rpc-lib/src/rpc-clnt-ping.h @@ -8,6 +8,7 @@ cases as published by the Free Software Foundation. */ +struct rpc_clnt; #define RPC_DEFAULT_PING_TIMEOUT 30 void rpc_clnt_check_and_start_ping(struct rpc_clnt *rpc_ptr); diff --git a/rpc/rpc-lib/src/rpc-drc.c b/rpc/rpc-lib/src/rpc-drc.c index bd8695c5cc..d083db24fc 100644 --- a/rpc/rpc-lib/src/rpc-drc.c +++ b/rpc/rpc-lib/src/rpc-drc.c @@ -13,8 +13,6 @@ #include "rpc-drc.h" #endif #include <glusterfs/locking.h> -#include <glusterfs/hashfn.h> -#include <glusterfs/common-utils.h> #include <glusterfs/statedump.h> #include <glusterfs/mem-pool.h> diff --git a/rpc/rpc-lib/src/rpc-transport.c b/rpc/rpc-lib/src/rpc-transport.c index baa8593f6c..2b64871763 100644 --- a/rpc/rpc-lib/src/rpc-transport.c +++ b/rpc/rpc-lib/src/rpc-transport.c @@ -18,10 +18,6 @@ #include <glusterfs/logging.h> #include "rpc-transport.h" #include <glusterfs/glusterfs.h> -/* FIXME: xlator.h is needed for volume_option_t, need to define the datatype - * in some other header - */ -#include <glusterfs/xlator.h> #include <glusterfs/list.h> #ifndef GF_OPTION_LIST_EMPTY diff --git a/rpc/rpc-lib/src/rpcsvc-auth.c b/rpc/rpc-lib/src/rpcsvc-auth.c index 18e6a133eb..8e76b4188b 100644 --- a/rpc/rpc-lib/src/rpcsvc-auth.c +++ b/rpc/rpc-lib/src/rpcsvc-auth.c @@ -9,7 +9,6 @@ */ #include "rpcsvc.h" -#include <glusterfs/logging.h> #include <glusterfs/dict.h> extern rpcsvc_auth_t * diff --git a/rpc/rpc-lib/src/rpcsvc-common.h b/rpc/rpc-lib/src/rpcsvc-common.h index d19b2d3f34..734601eef0 100644 --- a/rpc/rpc-lib/src/rpcsvc-common.h +++ b/rpc/rpc-lib/src/rpcsvc-common.h @@ -12,11 +12,8 @@ #define _RPCSVC_COMMON_H #include <pthread.h> -#include <glusterfs/list.h> #include <glusterfs/compat.h> -#include <glusterfs/glusterfs.h> #include <glusterfs/dict.h> -#include <glusterfs/xlator.h> typedef enum { RPCSVC_EVENT_ACCEPT, diff --git a/rpc/rpc-lib/src/rpcsvc.c b/rpc/rpc-lib/src/rpcsvc.c index cd5ca65cec..5639abbb20 100644 --- a/rpc/rpc-lib/src/rpcsvc.c +++ b/rpc/rpc-lib/src/rpcsvc.c @@ -11,14 +11,10 @@ #include "rpcsvc.h" #include "rpc-transport.h" #include <glusterfs/dict.h> -#include <glusterfs/logging.h> #include <glusterfs/byte-order.h> -#include <glusterfs/common-utils.h> #include <glusterfs/compat-errno.h> -#include <glusterfs/list.h> #include "xdr-rpc.h" #include <glusterfs/iobuf.h> -#include <glusterfs/globals.h> #include "xdr-common.h" #include "xdr-generic.h" #include "rpc-common-xdr.h" diff --git a/rpc/rpc-lib/src/rpcsvc.h b/rpc/rpc-lib/src/rpcsvc.h index a51edc7369..d9052392d4 100644 --- a/rpc/rpc-lib/src/rpcsvc.h +++ b/rpc/rpc-lib/src/rpcsvc.h @@ -13,14 +13,8 @@ #include <glusterfs/gf-event.h> #include "rpc-transport.h" -#include <glusterfs/logging.h> #include <glusterfs/dict.h> -#include <glusterfs/mem-pool.h> -#include <glusterfs/list.h> -#include <glusterfs/iobuf.h> #include "xdr-rpc.h" -#include <glusterfs/glusterfs.h> -#include <glusterfs/xlator.h> #include "rpcsvc-common.h" #include <pthread.h> diff --git a/rpc/rpc-lib/src/xdr-rpc.c b/rpc/rpc-lib/src/xdr-rpc.c index 2cf39a8bdf..4992dc5a7c 100644 --- a/rpc/rpc-lib/src/xdr-rpc.c +++ b/rpc/rpc-lib/src/xdr-rpc.c @@ -9,16 +9,12 @@ */ #include <rpc/rpc.h> -#include <rpc/pmap_clnt.h> -#include <arpa/inet.h> #include <rpc/xdr.h> #include <sys/uio.h> #include <rpc/auth_unix.h> -#include <glusterfs/mem-pool.h> #include "xdr-rpc.h" #include "xdr-common.h" -#include <glusterfs/logging.h> #include <glusterfs/common-utils.h> /* Decodes the XDR format in msgbuf into rpc_msg. diff --git a/rpc/rpc-lib/src/xdr-rpc.h b/rpc/rpc-lib/src/xdr-rpc.h index a57cd9430b..7baed27384 100644 --- a/rpc/rpc-lib/src/xdr-rpc.h +++ b/rpc/rpc-lib/src/xdr-rpc.h @@ -20,7 +20,6 @@ #include <rpc/auth_sys.h> #endif -//#include <rpc/pmap_clnt.h> #include <arpa/inet.h> #include <rpc/xdr.h> #include <sys/uio.h> diff --git a/rpc/rpc-lib/src/xdr-rpcclnt.c b/rpc/rpc-lib/src/xdr-rpcclnt.c index 8175cd00c3..8dcdcfeda8 100644 --- a/rpc/rpc-lib/src/xdr-rpcclnt.c +++ b/rpc/rpc-lib/src/xdr-rpcclnt.c @@ -9,17 +9,13 @@ */ #include <rpc/rpc.h> -#include <rpc/pmap_clnt.h> -#include <arpa/inet.h> #include <rpc/xdr.h> #include <sys/uio.h> #include <rpc/auth_unix.h> #include <errno.h> -#include <glusterfs/mem-pool.h> #include "xdr-rpc.h" #include "xdr-common.h" -#include <glusterfs/logging.h> #include <glusterfs/common-utils.h> /* Decodes the XDR format in msgbuf into rpc_msg. diff --git a/rpc/rpc-lib/src/xdr-rpcclnt.h b/rpc/rpc-lib/src/xdr-rpcclnt.h index 4d6e38d429..58eda4892a 100644 --- a/rpc/rpc-lib/src/xdr-rpcclnt.h +++ b/rpc/rpc-lib/src/xdr-rpcclnt.h @@ -11,8 +11,6 @@ #ifndef _XDR_RPCCLNT_H #define _XDR_RPCCLNT_H -//#include <rpc/rpc.h> -//#include <rpc/pmap_clnt.h> #include <arpa/inet.h> #include <rpc/xdr.h> #include <sys/uio.h> diff --git a/rpc/rpc-transport/socket/src/socket.c b/rpc/rpc-transport/socket/src/socket.c index 48f6116c45..4af8022f71 100644 --- a/rpc/rpc-transport/socket/src/socket.c +++ b/rpc/rpc-transport/socket/src/socket.c @@ -12,20 +12,15 @@ #include "name.h" #include <glusterfs/dict.h> #include "rpc-transport.h" -#include <glusterfs/logging.h> -#include <glusterfs/xlator.h> #include <glusterfs/syscall.h> #include <glusterfs/byte-order.h> -#include <glusterfs/common-utils.h> #include <glusterfs/compat-errno.h> #include "socket-mem-types.h" -#include <glusterfs/timer.h> /* ugly #includes below */ #include "protocol-common.h" #include "glusterfs3-xdr.h" #include "glusterfs4-xdr.h" -#include "xdr-nfs3.h" #include "rpcsvc.h" /* for TCP_USER_TIMEOUT */ diff --git a/rpc/rpc-transport/socket/src/socket.h b/rpc/rpc-transport/socket/src/socket.h index e7c0090919..44a727cc4a 100644 --- a/rpc/rpc-transport/socket/src/socket.h +++ b/rpc/rpc-transport/socket/src/socket.h @@ -22,12 +22,7 @@ #include <openssl/ecdh.h> #endif -#include <glusterfs/gf-event.h> #include "rpc-transport.h" -#include <glusterfs/logging.h> -#include <glusterfs/dict.h> -#include <glusterfs/mem-pool.h> -#include <glusterfs/globals.h> #include <glusterfs/refcount.h> #ifndef MAX_IOVEC |