summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpc-clnt.h
diff options
context:
space:
mode:
Diffstat (limited to 'rpc/rpc-lib/src/rpc-clnt.h')
-rw-r--r--rpc/rpc-lib/src/rpc-clnt.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/rpc/rpc-lib/src/rpc-clnt.h b/rpc/rpc-lib/src/rpc-clnt.h
index d16cc40aefe..2945265200b 100644
--- a/rpc/rpc-lib/src/rpc-clnt.h
+++ b/rpc/rpc-lib/src/rpc-clnt.h
@@ -85,8 +85,8 @@ typedef int (*rpcclnt_cb_fn)(struct rpc_clnt *rpc, void *mydata, void *data);
*/
typedef struct rpcclnt_actor_desc {
char procname[32];
- int procnum;
rpcclnt_cb_fn actor;
+ int procnum;
} rpcclnt_cb_actor_t;
/* Describes a program and its version along with the function pointers
@@ -98,8 +98,6 @@ typedef struct rpcclnt_cb_program {
int prognum;
int progver;
rpcclnt_cb_actor_t *actors; /* All procedure handlers */
- int numactors; /* Num actors in actor array */
-
/* Program specific state handed to actors */
void *private;
@@ -108,6 +106,8 @@ typedef struct rpcclnt_cb_program {
/* Needed for passing back in cb_actor */
void *mydata;
+ int numactors; /* Num actors in actor array */
+
} rpcclnt_cb_program_t;
typedef struct rpc_auth_data {
@@ -127,6 +127,7 @@ struct rpc_clnt_config {
struct rpc_clnt_connection {
pthread_mutex_t lock;
+ pthread_cond_t cond;
rpc_transport_t *trans;
struct rpc_clnt_config config;
gf_timer_t *reconnect;
@@ -151,17 +152,17 @@ typedef struct rpc_clnt_connection rpc_clnt_connection_t;
struct rpc_req {
rpc_clnt_connection_t *conn;
struct iovec req[2];
- int reqcnt;
struct iobref *req_iobref;
struct iovec rsp[2];
int rspcnt;
+ int reqcnt;
struct iobref *rsp_iobref;
- int rpc_status;
- rpc_auth_data_t verf;
rpc_clnt_prog_t *prog;
- int procnum;
+ rpc_auth_data_t verf;
fop_cbk_fn_t cbkfn;
void *conn_private;
+ int procnum;
+ int rpc_status;
uint32_t xid;
};
@@ -182,8 +183,8 @@ typedef struct rpc_clnt {
glusterfs_ctx_t *ctx;
gf_atomic_t refcount;
- int auth_value;
xlator_t *owner;
+ int auth_value;
char disabled;
} rpc_clnt_t;
@@ -250,12 +251,9 @@ int
rpcclnt_cbk_program_register(struct rpc_clnt *svc,
rpcclnt_cb_program_t *program, void *mydata);
-void
+int
rpc_clnt_disable(struct rpc_clnt *rpc);
-void
-rpc_clnt_disconnect(struct rpc_clnt *rpc);
-
int
rpc_clnt_mgmt_pmap_signout(glusterfs_ctx_t *ctx, char *brick_name);