diff options
author | Yaniv Kaul <ykaul@redhat.com> | 2018-11-08 07:50:48 +0200 |
---|---|---|
committer | Amar Tumballi <amarts@redhat.com> | 2018-11-12 03:25:02 +0000 |
commit | e134ef2493e8517a6f341416c11230c2bb5bcd6c (patch) | |
tree | fefc23b571bef6521f2d0eb14e840ea447c79ec3 /rpc/rpc-lib/src/rpc-clnt.h | |
parent | cac2dba48bf8029b2b0421850fcc4598e33569f6 (diff) |
rpc-clnt*: several code changes to reduce conn lock times
Assorted code refactoring to reduce lock contention.
Also, took the opportunity to reorder structs more properly.
Removed dead code.
Hopefully, no functional changes.
Compile-tested only!
updates: bz#1193929
Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Change-Id: I5de6124ad071fd5e2c31832364d602b5f6d6fe28
Diffstat (limited to 'rpc/rpc-lib/src/rpc-clnt.h')
-rw-r--r-- | rpc/rpc-lib/src/rpc-clnt.h | 19 |
1 files changed, 8 insertions, 11 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.h b/rpc/rpc-lib/src/rpc-clnt.h index 28b6f0e7f4d..d122382e446 100644 --- a/rpc/rpc-lib/src/rpc-clnt.h +++ b/rpc/rpc-lib/src/rpc-clnt.h @@ -133,24 +133,23 @@ struct rpc_clnt_connection { gf_timer_t *timer; gf_timer_t *ping_timer; struct rpc_clnt *rpc_clnt; - char connected; - gf_boolean_t disconnected; struct saved_frames *saved_frames; - int32_t frame_timeout; struct timespec last_sent; struct timespec last_received; - int32_t ping_started; - char *name; - int32_t ping_timeout; uint64_t pingcnt; uint64_t msgcnt; uint64_t cleanup_gen; + char *name; + int32_t ping_started; + int32_t frame_timeout; + int32_t ping_timeout; + gf_boolean_t disconnected; + char connected; }; typedef struct rpc_clnt_connection rpc_clnt_connection_t; struct rpc_req { rpc_clnt_connection_t *conn; - uint32_t xid; struct iovec req[2]; int reqcnt; struct iobref *req_iobref; @@ -163,6 +162,7 @@ struct rpc_req { int procnum; fop_cbk_fn_t cbkfn; void *conn_private; + uint32_t xid; }; typedef struct rpc_clnt { @@ -183,8 +183,8 @@ typedef struct rpc_clnt { glusterfs_ctx_t *ctx; gf_atomic_t refcount; int auth_value; - char disabled; xlator_t *owner; + char disabled; } rpc_clnt_t; struct rpc_clnt * @@ -256,9 +256,6 @@ rpc_clnt_disable(struct rpc_clnt *rpc); void rpc_clnt_disconnect(struct rpc_clnt *rpc); -char -rpc_clnt_is_disabled(struct rpc_clnt *rpc); - int rpc_clnt_mgmt_pmap_signout(glusterfs_ctx_t *ctx, char *brick_name); |