summaryrefslogtreecommitdiffstats
path: root/xlators/protocol/client/src/client.h
diff options
context:
space:
mode:
authorPoornima G <pgurusid@redhat.com>2019-03-24 09:40:50 +0530
committerPoornima G <pgurusid@redhat.com>2019-03-29 15:23:52 +0000
commitdbfff66092178b03667b45cff9f97635129ab8be (patch)
tree0963d937297f676c7199dd283d7b3fd9e9ccbf91 /xlators/protocol/client/src/client.h
parent4e7afab231e22fc740e2d8a39fd7eaefd1fa9f2f (diff)
client-rpc: Fix the payload being sent on the wire
The fops allocate 3 kind of payload(buffer) in the client xlator: - fop payload, this is the buffer allocated by the write and put fop - rsphdr paylod, this is the buffer required by the reply cbk of some fops like lookup, readdir. - rsp_paylod, this is the buffer required by the reply cbk of fops like readv etc. Currently, in the lookup and readdir fop the rsphdr is sent as payload, hence the allocated rsphdr buffer is also sent on the wire, increasing the bandwidth consumption on the wire. With this patch, the issue is fixed. Fixes: bz#1692101 Change-Id: Ie8158921f4db319e60ad5f52d851fa5c9d4a269b Signed-off-by: Poornima G <pgurusid@redhat.com>
Diffstat (limited to 'xlators/protocol/client/src/client.h')
-rw-r--r--xlators/protocol/client/src/client.h16
1 files changed, 12 insertions, 4 deletions
diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h
index 71f84f3ca89..f12fa61bb93 100644
--- a/xlators/protocol/client/src/client.h
+++ b/xlators/protocol/client/src/client.h
@@ -345,6 +345,17 @@ typedef struct client_args {
lock_migration_info_t *locklist;
} clnt_args_t;
+typedef struct client_payload {
+ struct iobref *iobref;
+ struct iovec *payload;
+ struct iovec *rsphdr;
+ struct iovec *rsp_payload;
+ struct iobref *rsp_iobref;
+ int payload_cnt;
+ int rsphdr_cnt;
+ int rsp_payload_cnt;
+} client_payload_t;
+
typedef ssize_t (*gfs_serialize_t)(struct iovec outmsg, void *args);
clnt_fd_ctx_t *
@@ -359,10 +370,7 @@ client_local_wipe(clnt_local_t *local);
int
client_submit_request(xlator_t *this, void *req, call_frame_t *frame,
rpc_clnt_prog_t *prog, int procnum, fop_cbk_fn_t cbk,
- struct iobref *iobref, struct iovec *rsphdr,
- int rsphdr_count, struct iovec *rsp_payload,
- int rsp_count, struct iobref *rsp_iobref,
- xdrproc_t xdrproc);
+ client_payload_t *cp, xdrproc_t xdrproc);
int
client_submit_compound_request(xlator_t *this, void *req, call_frame_t *frame,