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 /rpc | |
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 '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 fe5fe030767..69a96f7512f 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 820a2c03953..6d059b9da50 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 cacb1ff8008..61d475a5e84 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 15f2b61cd05..25a7148e5a3 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 fcbac6f9e21..e5466a828c2 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 bd8695c5ccf..d083db24fc5 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 baa8593f6c6..2b648717635 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 18e6a133ebe..8e76b4188bb 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 d19b2d3f34c..734601eef0b 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 cd5ca65cec3..5639abbb204 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 a51edc73698..d9052392d47 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 2cf39a8bdfc..4992dc5a7ce 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 a57cd9430be..7baed273846 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 8175cd00c3a..8dcdcfeda83 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 4d6e38d429c..58eda4892a9 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 48f6116c458..4af8022f71d 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 e7c00909192..44a727cc4a1 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 |