summaryrefslogtreecommitdiffstats
path: root/rpc/rpc-lib/src/rpc-transport.h
diff options
context:
space:
mode:
authorYaniv Kaul <ykaul@redhat.com>2018-11-23 12:14:59 +0200
committerAmar Tumballi <amarts@redhat.com>2018-12-03 05:53:34 +0000
commitb56bf714c1f22212700db50c057e4e47b99be739 (patch)
treec647a596293fe31961d601487bdd943a1d1516cd /rpc/rpc-lib/src/rpc-transport.h
parent99c72652f81ca5ea212adbb5a555e12a4de94491 (diff)
rpc *.h fles: align structs
Make an effort to slightly better align the structures. Change-Id: I6f80a451f2ffbf15adfb986cedc24c2799787b49 updates: bz#1193929 Signed-off-by: Yaniv Kaul <ykaul@redhat.com>
Diffstat (limited to 'rpc/rpc-lib/src/rpc-transport.h')
-rw-r--r--rpc/rpc-lib/src/rpc-transport.h22
1 files changed, 10 insertions, 12 deletions
diff --git a/rpc/rpc-lib/src/rpc-transport.h b/rpc/rpc-lib/src/rpc-transport.h
index fd737d0c764..87ea3a28dfd 100644
--- a/rpc/rpc-lib/src/rpc-transport.h
+++ b/rpc/rpc-lib/src/rpc-transport.h
@@ -61,12 +61,12 @@ typedef struct rpc_transport rpc_transport_t;
#include "rpcsvc-common.h"
struct peer_info {
- struct sockaddr_storage sockaddr;
- socklen_t sockaddr_len;
- char identifier[UNIX_PATH_MAX];
// OP-VERSION of clients
uint32_t max_op_version;
uint32_t min_op_version;
+ struct sockaddr_storage sockaddr;
+ socklen_t sockaddr_len;
+ char identifier[UNIX_PATH_MAX];
// Volume mounted by client
char volname[NAME_MAX];
};
@@ -121,24 +121,24 @@ struct rpc_transport_rsp {
typedef struct rpc_transport_rsp rpc_transport_rsp_t;
struct rpc_transport_req {
+ struct rpc_req *rpc_req;
rpc_transport_msg_t msg;
rpc_transport_rsp_t rsp;
- struct rpc_req *rpc_req;
};
typedef struct rpc_transport_req rpc_transport_req_t;
struct rpc_transport_reply {
- rpc_transport_msg_t msg;
void *private;
+ rpc_transport_msg_t msg;
};
typedef struct rpc_transport_reply rpc_transport_reply_t;
struct rpc_transport_data {
- char is_request;
union {
rpc_transport_req_t req;
rpc_transport_reply_t reply;
} data;
+ char is_request;
};
typedef struct rpc_transport_data rpc_transport_data_t;
@@ -146,22 +146,22 @@ typedef struct rpc_transport_data rpc_transport_data_t;
* rpc_request, hence these should be removed from request_info
*/
struct rpc_request_info {
- uint32_t xid;
int prognum;
int progver;
int procnum;
void *rpc_req; /* struct rpc_req */
rpc_transport_rsp_t rsp;
+ uint32_t xid;
};
typedef struct rpc_request_info rpc_request_info_t;
struct rpc_transport_pollin {
- struct iovec vector[MAX_IOVEC];
int count;
- char vectored;
void *private;
struct iobref *iobref;
+ struct iovec vector[MAX_IOVEC];
char is_reply;
+ char vectored;
};
typedef struct rpc_transport_pollin rpc_transport_pollin_t;
@@ -182,9 +182,6 @@ struct rpc_transport {
void *mydata;
pthread_mutex_t lock;
gf_atomic_t refcount;
-
- int32_t outstanding_rpc_count;
-
glusterfs_ctx_t *ctx;
dict_t *options;
char *name;
@@ -202,6 +199,7 @@ struct rpc_transport {
uint64_t total_bytes_read;
uint64_t total_bytes_write;
uint32_t xid; /* RPC/XID used for callbacks */
+ int32_t outstanding_rpc_count;
struct list_head list;
int bind_insecure;