diff options
author | Amar Tumballi <amarts@redhat.com> | 2019-06-28 22:51:37 +0530 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2019-08-16 05:37:03 +0000 |
commit | 29cfe643cbcf7826375a3d52ff1865706a35bc38 (patch) | |
tree | add22d6f9e8b8afaae089625526d521c53c8b33c /libglusterfs/src/glusterfs/client_t.h | |
parent | a24288c5c9da9137eb1d5d487bc7cd11af01b88b (diff) |
libglusterfs: remove dependency of rpc
Goal: 'libglusterfs' files shouldn't have any dependency outside of
the tree, specially the header files, shouldn't have '#include'
from outside the tree.
Fixes:
* Had to introduce libglusterd so, methods and structures required
for only mgmt/glusterd, and cli/ are separated from 'libglusterfs/'
* Remove rpc/xdr/gen from build, which was used mainly so
dependency for libglusterfs could be properly satisfied.
* Move rpcsvc_auth_data to client_t.h, so all dependencies could
be handled.
Updates: bz#1636297
Change-Id: I0e80243a5a3f4615e6fac6e1b947ad08a9363fce
Signed-off-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'libglusterfs/src/glusterfs/client_t.h')
-rw-r--r-- | libglusterfs/src/glusterfs/client_t.h | 21 |
1 files changed, 15 insertions, 6 deletions
diff --git a/libglusterfs/src/glusterfs/client_t.h b/libglusterfs/src/glusterfs/client_t.h index 8ef3665a9c2..6bc03271eed 100644 --- a/libglusterfs/src/glusterfs/client_t.h +++ b/libglusterfs/src/glusterfs/client_t.h @@ -15,6 +15,17 @@ #include "glusterfs/locking.h" /* for gf_lock_t, not included by glusterfs.h */ #include "glusterfs/atomic.h" /* for gf_atomic_t */ +/* auth_data structure is required by RPC layer. But as it is also used in + * client_t structure validation, comparision, it is critical that it is defined + * in the larger scope of libglusterfs, instead of libgfrpc. With this change, + * even RPC will use this structure */ +#define GF_CLIENTT_AUTH_BYTES 400 +typedef struct client_auth_data { + int flavour; + int datalen; + char authdata[GF_CLIENTT_AUTH_BYTES]; +} client_auth_data_t; + struct client_ctx { void *ctx_key; void *ctx_value; @@ -78,12 +89,6 @@ typedef struct clienttable clienttable_t; */ #define GF_CLIENTENTRY_ALLOCATED -2 -struct rpcsvc_auth_data; - -client_t * -gf_client_get(xlator_t *this, struct rpcsvc_auth_data *cred, char *client_uid, - char *subdir_mount); - void gf_client_put(client_t *client, gf_boolean_t *detached); @@ -138,4 +143,8 @@ gf_client_dump_inodes(xlator_t *this); int gf_client_disconnect(client_t *client); +client_t * +gf_client_get(xlator_t *this, client_auth_data_t *cred, char *client_uid, + char *subdir_mount); + #endif /* _CLIENT_T_H */ |