e3c68b
From 83d816370f7540d4065baac704df65c648a03125 Mon Sep 17 00:00:00 2001
e3c68b
From: Poornima G <pgurusid@redhat.com>
e3c68b
Date: Sun, 24 Mar 2019 09:40:50 +0530
e3c68b
Subject: [PATCH 47/52] client-rpc: Fix the payload being sent on the wire
e3c68b
e3c68b
The fops allocate 3 kind of payload(buffer) in the client xlator:
e3c68b
- fop payload, this is the buffer allocated by the write and put fop
e3c68b
- rsphdr paylod, this is the buffer required by the reply cbk of
e3c68b
  some fops like lookup, readdir.
e3c68b
- rsp_paylod, this is the buffer required by the reply cbk of fops like
e3c68b
  readv etc.
e3c68b
e3c68b
Currently, in the lookup and readdir fop the rsphdr is sent as payload,
e3c68b
hence the allocated rsphdr buffer is also sent on the wire, increasing
e3c68b
the bandwidth consumption on the wire.
e3c68b
e3c68b
With this patch, the issue is fixed.
e3c68b
e3c68b
>Fixes: bz#1692093
e3c68b
>Change-Id: Ie8158921f4db319e60ad5f52d851fa5c9d4a269b
e3c68b
>Signed-off-by: Poornima G <pgurusid@redhat.com>
e3c68b
>Backport-of: https://review.gluster.org/22402/
e3c68b
e3c68b
BUG: 1693935
e3c68b
Change-Id: Id12746a4c9416288bc1387c8b018bbe9cc4b637d
e3c68b
Signed-off-by: Poornima G <pgurusid@redhat.com>
e3c68b
Reviewed-on: https://code.engineering.redhat.com/gerrit/166535
e3c68b
Tested-by: RHGS Build Bot <nigelb@redhat.com>
e3c68b
Reviewed-by: Sunil Kumar Heggodu Gopala Acharya <sheggodu@redhat.com>
e3c68b
---
e3c68b
 xlators/protocol/client/src/client-handshake.c   |  29 ++-
e3c68b
 xlators/protocol/client/src/client-helpers.c     |  14 +-
e3c68b
 xlators/protocol/client/src/client-rpc-fops.c    | 235 ++++++++++++----------
e3c68b
 xlators/protocol/client/src/client-rpc-fops_v2.c | 236 ++++++++++++-----------
e3c68b
 xlators/protocol/client/src/client.c             |  22 ++-
e3c68b
 xlators/protocol/client/src/client.h             |  16 +-
e3c68b
 6 files changed, 308 insertions(+), 244 deletions(-)
e3c68b
e3c68b
diff --git a/xlators/protocol/client/src/client-handshake.c b/xlators/protocol/client/src/client-handshake.c
e3c68b
index f9631c5..c43756a 100644
e3c68b
--- a/xlators/protocol/client/src/client-handshake.c
e3c68b
+++ b/xlators/protocol/client/src/client-handshake.c
e3c68b
@@ -34,7 +34,6 @@ typedef struct client_fd_lk_local {
e3c68b
     clnt_fd_ctx_t *fdctx;
e3c68b
 } clnt_fd_lk_local_t;
e3c68b
 
e3c68b
-
e3c68b
 int32_t
e3c68b
 client3_getspec(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
 {
e3c68b
@@ -201,8 +200,8 @@ clnt_release_reopen_fd(xlator_t *this, clnt_fd_ctx_t *fdctx)
e3c68b
     req.fd = fdctx->remote_fd;
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_RELEASE,
e3c68b
-                                clnt_release_reopen_fd_cbk, NULL, NULL, 0, NULL,
e3c68b
-                                0, NULL, (xdrproc_t)xdr_gfs3_releasedir_req);
e3c68b
+                                clnt_release_reopen_fd_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_releasedir_req);
e3c68b
 out:
e3c68b
     if (ret) {
e3c68b
         clnt_fd_lk_reacquire_failed(this, fdctx, conf);
e3c68b
@@ -486,8 +485,8 @@ protocol_client_reopendir(clnt_fd_ctx_t *fdctx, xlator_t *this)
e3c68b
     frame->local = local;
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_OPENDIR,
e3c68b
-                                client3_3_reopendir_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_opendir_req);
e3c68b
+                                client3_3_reopendir_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_opendir_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_ERROR, 0, PC_MSG_DIR_OP_FAILED,
e3c68b
                "failed to send the re-opendir request");
e3c68b
@@ -547,8 +546,8 @@ protocol_client_reopenfile(clnt_fd_ctx_t *fdctx, xlator_t *this)
e3c68b
                  local->loc.path);
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_OPEN,
e3c68b
-                                client3_3_reopen_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_open_req);
e3c68b
+                                client3_3_reopen_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_open_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_ERROR, 0, PC_MSG_DIR_OP_FAILED,
e3c68b
                "failed to send the re-open request");
e3c68b
@@ -745,8 +744,8 @@ protocol_client_reopendir_v2(clnt_fd_ctx_t *fdctx, xlator_t *this)
e3c68b
     frame->local = local;
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_OPENDIR,
e3c68b
-                                client4_0_reopendir_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_opendir_req);
e3c68b
+                                client4_0_reopendir_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_opendir_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_ERROR, 0, PC_MSG_DIR_OP_FAILED,
e3c68b
                "failed to send the re-opendir request");
e3c68b
@@ -806,8 +805,8 @@ protocol_client_reopenfile_v2(clnt_fd_ctx_t *fdctx, xlator_t *this)
e3c68b
                  local->loc.path);
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_OPEN,
e3c68b
-                                client4_0_reopen_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_open_req);
e3c68b
+                                client4_0_reopen_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_open_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_ERROR, 0, PC_MSG_DIR_OP_FAILED,
e3c68b
                "failed to send the re-open request");
e3c68b
@@ -1312,7 +1311,6 @@ client_setvolume(xlator_t *this, struct rpc_clnt *rpc)
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, fr, conf->handshake,
e3c68b
                                 GF_HNDSK_SETVOLUME, client_setvolume_cbk, NULL,
e3c68b
-                                NULL, 0, NULL, 0, NULL,
e3c68b
                                 (xdrproc_t)xdr_gf_setvolume_req);
e3c68b
 
e3c68b
 fail:
e3c68b
@@ -1522,8 +1520,7 @@ client_query_portmap(xlator_t *this, struct rpc_clnt *rpc)
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, fr, &clnt_pmap_prog,
e3c68b
                                 GF_PMAP_PORTBYBRICK, client_query_portmap_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_pmap_port_by_brick_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_pmap_port_by_brick_req);
e3c68b
 
e3c68b
 fail:
e3c68b
     return ret;
e3c68b
@@ -1624,8 +1621,8 @@ client_handshake(xlator_t *this, struct rpc_clnt *rpc)
e3c68b
 
e3c68b
     req.gfs_id = 0xbabe;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->dump, GF_DUMP_DUMP,
e3c68b
-                                client_dump_version_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gf_dump_req);
e3c68b
+                                client_dump_version_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gf_dump_req);
e3c68b
 
e3c68b
 out:
e3c68b
     return ret;
e3c68b
diff --git a/xlators/protocol/client/src/client-helpers.c b/xlators/protocol/client/src/client-helpers.c
e3c68b
index 2dd7106..53b4484 100644
e3c68b
--- a/xlators/protocol/client/src/client-helpers.c
e3c68b
+++ b/xlators/protocol/client/src/client-helpers.c
e3c68b
@@ -3082,8 +3082,7 @@ send_release4_0_over_wire(xlator_t *this, clnt_fd_ctx_t *fdctx,
e3c68b
         gf_msg_trace(this->name, 0, "sending releasedir on fd");
e3c68b
         (void)client_submit_request(
e3c68b
             this, &req, fr, conf->fops, GFS3_OP_RELEASEDIR,
e3c68b
-            client4_0_releasedir_cbk, NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-            (xdrproc_t)xdr_gfx_releasedir_req);
e3c68b
+            client4_0_releasedir_cbk, NULL, (xdrproc_t)xdr_gfx_releasedir_req);
e3c68b
     } else {
e3c68b
         gfx_release_req req = {
e3c68b
             {
e3c68b
@@ -3094,8 +3093,8 @@ send_release4_0_over_wire(xlator_t *this, clnt_fd_ctx_t *fdctx,
e3c68b
         req.fd = fdctx->remote_fd;
e3c68b
         gf_msg_trace(this->name, 0, "sending release on fd");
e3c68b
         (void)client_submit_request(this, &req, fr, conf->fops, GFS3_OP_RELEASE,
e3c68b
-                                    client4_0_release_cbk, NULL, NULL, 0, NULL,
e3c68b
-                                    0, NULL, (xdrproc_t)xdr_gfx_release_req);
e3c68b
+                                    client4_0_release_cbk, NULL,
e3c68b
+                                    (xdrproc_t)xdr_gfx_release_req);
e3c68b
     }
e3c68b
 
e3c68b
     return 0;
e3c68b
@@ -3118,8 +3117,7 @@ send_release3_3_over_wire(xlator_t *this, clnt_fd_ctx_t *fdctx,
e3c68b
         gf_msg_trace(this->name, 0, "sending releasedir on fd");
e3c68b
         (void)client_submit_request(
e3c68b
             this, &req, fr, conf->fops, GFS3_OP_RELEASEDIR,
e3c68b
-            client3_3_releasedir_cbk, NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-            (xdrproc_t)xdr_gfs3_releasedir_req);
e3c68b
+            client3_3_releasedir_cbk, NULL, (xdrproc_t)xdr_gfs3_releasedir_req);
e3c68b
     } else {
e3c68b
         gfs3_release_req req = {
e3c68b
             {
e3c68b
@@ -3130,8 +3128,8 @@ send_release3_3_over_wire(xlator_t *this, clnt_fd_ctx_t *fdctx,
e3c68b
         req.fd = fdctx->remote_fd;
e3c68b
         gf_msg_trace(this->name, 0, "sending release on fd");
e3c68b
         (void)client_submit_request(this, &req, fr, conf->fops, GFS3_OP_RELEASE,
e3c68b
-                                    client3_3_release_cbk, NULL, NULL, 0, NULL,
e3c68b
-                                    0, NULL, (xdrproc_t)xdr_gfs3_release_req);
e3c68b
+                                    client3_3_release_cbk, NULL,
e3c68b
+                                    (xdrproc_t)xdr_gfs3_release_req);
e3c68b
     }
e3c68b
 
e3c68b
     return 0;
e3c68b
diff --git a/xlators/protocol/client/src/client-rpc-fops.c b/xlators/protocol/client/src/client-rpc-fops.c
e3c68b
index b7df7cc..1c8b31b 100644
e3c68b
--- a/xlators/protocol/client/src/client-rpc-fops.c
e3c68b
+++ b/xlators/protocol/client/src/client-rpc-fops.c
e3c68b
@@ -3234,11 +3234,13 @@ client3_3_lookup(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     struct iobref *rsp_iobref = NULL;
e3c68b
     struct iobuf *rsp_iobuf = NULL;
e3c68b
     struct iovec *rsphdr = NULL;
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
     memset(vector, 0, sizeof(vector));
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
 
e3c68b
     conf = this->private;
e3c68b
     args = data;
e3c68b
@@ -3288,9 +3290,12 @@ client3_3_lookup(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         op_errno = -ret;
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
+
e3c68b
+    cp.rsphdr = rsphdr;
e3c68b
+    cp.rsphdr_cnt = count;
e3c68b
+    cp.rsp_iobref = local->iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_LOOKUP,
e3c68b
-                                client3_3_lookup_cbk, NULL, rsphdr, count, NULL,
e3c68b
-                                0, local->iobref,
e3c68b
+                                client3_3_lookup_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfs3_lookup_req);
e3c68b
 
e3c68b
     if (ret) {
e3c68b
@@ -3338,8 +3343,8 @@ client3_3_stat(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_STAT,
e3c68b
-                                client3_3_stat_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_stat_req);
e3c68b
+                                client3_3_stat_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_stat_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3381,8 +3386,8 @@ client3_3_truncate(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_TRUNCATE,
e3c68b
-                                client3_3_truncate_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_truncate_req);
e3c68b
+                                client3_3_truncate_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_truncate_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3425,8 +3430,7 @@ client3_3_ftruncate(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_FTRUNCATE, client3_3_ftruncate_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfs3_ftruncate_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfs3_ftruncate_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3468,8 +3472,8 @@ client3_3_access(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_ACCESS,
e3c68b
-                                client3_3_access_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_access_req);
e3c68b
+                                client3_3_access_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_access_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3505,10 +3509,12 @@ client3_3_readlink(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     struct iovec vector[MAX_IOVEC] = {
e3c68b
         {0},
e3c68b
     };
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
 
e3c68b
     conf = this->private;
e3c68b
@@ -3547,9 +3553,11 @@ client3_3_readlink(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     rsp_iobuf = NULL;
e3c68b
     rsp_iobref = NULL;
e3c68b
 
e3c68b
+    cp.rsphdr = rsphdr;
e3c68b
+    cp.rsphdr_cnt = count;
e3c68b
+    cp.rsp_iobref = local->iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_READLINK,
e3c68b
-                                client3_3_readlink_cbk, NULL, rsphdr, count,
e3c68b
-                                NULL, 0, local->iobref,
e3c68b
+                                client3_3_readlink_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfs3_readlink_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -3595,8 +3603,8 @@ client3_3_unlink(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_UNLINK,
e3c68b
-                                client3_3_unlink_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_unlink_req);
e3c68b
+                                client3_3_unlink_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_unlink_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3638,8 +3646,8 @@ client3_3_rmdir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_RMDIR,
e3c68b
-                                client3_3_rmdir_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_rmdir_req);
e3c68b
+                                client3_3_rmdir_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_rmdir_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3697,8 +3705,8 @@ client3_3_symlink(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_SYMLINK,
e3c68b
-                                client3_3_symlink_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_symlink_req);
e3c68b
+                                client3_3_symlink_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_symlink_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3743,8 +3751,8 @@ client3_3_rename(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_RENAME,
e3c68b
-                                client3_3_rename_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_rename_req);
e3c68b
+                                client3_3_rename_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_rename_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3802,8 +3810,8 @@ client3_3_link(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     loc_path(&local->loc2, NULL);
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_LINK,
e3c68b
-                                client3_3_link_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_link_req);
e3c68b
+                                client3_3_link_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_link_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3857,8 +3865,8 @@ client3_3_mknod(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_MKNOD,
e3c68b
-                                client3_3_mknod_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_mknod_req);
e3c68b
+                                client3_3_mknod_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_mknod_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3924,8 +3932,8 @@ client3_3_mkdir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_MKDIR,
e3c68b
-                                client3_3_mkdir_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_mkdir_req);
e3c68b
+                                client3_3_mkdir_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_mkdir_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3982,8 +3990,8 @@ client3_3_create(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_CREATE,
e3c68b
-                                client3_3_create_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_create_req);
e3c68b
+                                client3_3_create_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_create_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4043,8 +4051,8 @@ client3_3_open(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_OPEN,
e3c68b
-                                client3_3_open_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_open_req);
e3c68b
+                                client3_3_open_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_open_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4079,10 +4087,12 @@ client3_3_readv(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     };
e3c68b
     struct iobuf *rsp_iobuf = NULL;
e3c68b
     struct iobref *rsp_iobref = NULL;
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
     conf = this->private;
e3c68b
 
e3c68b
@@ -4130,9 +4140,12 @@ client3_3_readv(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     local->iobref = rsp_iobref;
e3c68b
     rsp_iobref = NULL;
e3c68b
 
e3c68b
+    cp.rsp_payload = &rsp_vec;
e3c68b
+    cp.rsp_payload_cnt = 1;
e3c68b
+    cp.rsp_iobref = local->iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_READ,
e3c68b
-                                client3_3_readv_cbk, NULL, NULL, 0, &rsp_vec, 1,
e3c68b
-                                local->iobref, (xdrproc_t)xdr_gfs3_read_req);
e3c68b
+                                client3_3_readv_cbk, &cp,
e3c68b
+                                (xdrproc_t)xdr_gfs3_read_req);
e3c68b
     if (ret) {
e3c68b
         // unwind is done in the cbk
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -4167,10 +4180,12 @@ client3_3_writev(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     };
e3c68b
     int op_errno = ESTALE;
e3c68b
     int ret = 0;
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
     conf = this->private;
e3c68b
 
e3c68b
@@ -4187,9 +4202,12 @@ client3_3_writev(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         op_errno = -ret;
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
+
e3c68b
+    cp.iobref = args->iobref;
e3c68b
+    cp.payload = args->vector;
e3c68b
+    cp.payload_cnt = args->count;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_WRITE,
e3c68b
-                                client3_3_writev_cbk, args->iobref,
e3c68b
-                                args->vector, args->count, NULL, 0, NULL,
e3c68b
+                                client3_3_writev_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfs3_write_req);
e3c68b
     if (ret) {
e3c68b
         /*
e3c68b
@@ -4248,8 +4266,8 @@ client3_3_flush(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FLUSH,
e3c68b
-                                client3_3_flush_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_flush_req);
e3c68b
+                                client3_3_flush_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_flush_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4291,8 +4309,8 @@ client3_3_fsync(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FSYNC,
e3c68b
-                                client3_3_fsync_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_fsync_req);
e3c68b
+                                client3_3_fsync_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_fsync_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4336,8 +4354,8 @@ client3_3_fstat(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FSTAT,
e3c68b
-                                client3_3_fstat_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_fstat_req);
e3c68b
+                                client3_3_fstat_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_fstat_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4391,8 +4409,8 @@ client3_3_opendir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_OPENDIR,
e3c68b
-                                client3_3_opendir_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_opendir_req);
e3c68b
+                                client3_3_opendir_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_opendir_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4435,8 +4453,8 @@ client3_3_fsyncdir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FSYNCDIR,
e3c68b
-                                client3_3_fsyncdir_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_fsyncdir_req);
e3c68b
+                                client3_3_fsyncdir_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_fsyncdir_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4479,8 +4497,8 @@ client3_3_statfs(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_STATFS,
e3c68b
-                                client3_3_statfs_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_statfs_req);
e3c68b
+                                client3_3_statfs_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_statfs_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4523,8 +4541,8 @@ client3_3_setxattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_SETXATTR,
e3c68b
-                                client3_3_setxattr_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_setxattr_req);
e3c68b
+                                client3_3_setxattr_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_setxattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4570,8 +4588,7 @@ client3_3_fsetxattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_FSETXATTR, client3_3_fsetxattr_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfs3_fsetxattr_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfs3_fsetxattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4611,10 +4628,12 @@ client3_3_fgetxattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     struct iovec vector[MAX_IOVEC] = {
e3c68b
         {0},
e3c68b
     };
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
     conf = this->private;
e3c68b
 
e3c68b
@@ -4654,9 +4673,12 @@ client3_3_fgetxattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         op_errno = -ret;
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
+
e3c68b
+    cp.rsphdr = rsphdr;
e3c68b
+    cp.rsphdr_cnt = count;
e3c68b
+    cp.rsp_iobref = local->iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
-                                GFS3_OP_FGETXATTR, client3_3_fgetxattr_cbk,
e3c68b
-                                NULL, rsphdr, count, NULL, 0, local->iobref,
e3c68b
+                                GFS3_OP_FGETXATTR, client3_3_fgetxattr_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfs3_fgetxattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -4699,11 +4721,14 @@ client3_3_getxattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     struct iovec vector[MAX_IOVEC] = {
e3c68b
         {0},
e3c68b
     };
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data) {
e3c68b
         op_errno = 0;
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
+
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
 
e3c68b
     local = mem_get0(this->local_pool);
e3c68b
@@ -4775,9 +4800,12 @@ client3_3_getxattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         op_errno = -ret;
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
+
e3c68b
+    cp.rsphdr = rsphdr;
e3c68b
+    cp.rsphdr_cnt = count;
e3c68b
+    cp.rsp_iobref = local->iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_GETXATTR,
e3c68b
-                                client3_3_getxattr_cbk, NULL, rsphdr, count,
e3c68b
-                                NULL, 0, local->iobref,
e3c68b
+                                client3_3_getxattr_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfs3_getxattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -4822,10 +4850,12 @@ client3_3_xattrop(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     struct iovec vector[MAX_IOVEC] = {
e3c68b
         {0},
e3c68b
     };
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
 
e3c68b
     if (!(args->loc && args->loc->inode))
e3c68b
@@ -4871,9 +4901,12 @@ client3_3_xattrop(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         op_errno = -ret;
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
+
e3c68b
+    cp.rsphdr = rsphdr;
e3c68b
+    cp.rsphdr_cnt = count;
e3c68b
+    cp.rsp_iobref = local->iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_XATTROP,
e3c68b
-                                client3_3_xattrop_cbk, NULL, rsphdr, count,
e3c68b
-                                NULL, 0, local->iobref,
e3c68b
+                                client3_3_xattrop_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfs3_xattrop_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -4918,10 +4951,12 @@ client3_3_fxattrop(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     struct iovec vector[MAX_IOVEC] = {
e3c68b
         {0},
e3c68b
     };
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
     conf = this->private;
e3c68b
 
e3c68b
@@ -4962,9 +4997,11 @@ client3_3_fxattrop(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     rsp_iobuf = NULL;
e3c68b
     rsp_iobref = NULL;
e3c68b
 
e3c68b
+    cp.rsphdr = rsphdr;
e3c68b
+    cp.rsphdr_cnt = count;
e3c68b
+    cp.rsp_iobref = local->iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FXATTROP,
e3c68b
-                                client3_3_fxattrop_cbk, NULL, rsphdr, count,
e3c68b
-                                NULL, 0, local->iobref,
e3c68b
+                                client3_3_fxattrop_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfs3_fxattrop_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -5016,8 +5053,7 @@ client3_3_removexattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_REMOVEXATTR, client3_3_removexattr_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfs3_removexattr_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfs3_removexattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5059,10 +5095,9 @@ client3_3_fremovexattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         op_errno = -ret;
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
-    ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
-                                GFS3_OP_FREMOVEXATTR,
e3c68b
-                                client3_3_fremovexattr_cbk, NULL, NULL, 0, NULL,
e3c68b
-                                0, NULL, (xdrproc_t)xdr_gfs3_fremovexattr_req);
e3c68b
+    ret = client_submit_request(
e3c68b
+        this, &req, frame, conf->fops, GFS3_OP_FREMOVEXATTR,
e3c68b
+        client3_3_fremovexattr_cbk, NULL, (xdrproc_t)xdr_gfs3_fremovexattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5104,8 +5139,8 @@ client3_3_lease(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_LEASE,
e3c68b
-                                client3_3_lease_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_lease_req);
e3c68b
+                                client3_3_lease_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_lease_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5167,7 +5202,7 @@ client3_3_lk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_LK,
e3c68b
-                                client3_3_lk_cbk, NULL, NULL, 0, NULL, 0, NULL,
e3c68b
+                                client3_3_lk_cbk, NULL,
e3c68b
                                 (xdrproc_t)xdr_gfs3_lk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -5210,8 +5245,8 @@ client3_3_inodelk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_INODELK,
e3c68b
-                                client3_3_inodelk_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_inodelk_req);
e3c68b
+                                client3_3_inodelk_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_inodelk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5260,8 +5295,8 @@ client3_3_finodelk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FINODELK,
e3c68b
-                                client3_3_finodelk_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_finodelk_req);
e3c68b
+                                client3_3_finodelk_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_finodelk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5305,8 +5340,8 @@ client3_3_entrylk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_ENTRYLK,
e3c68b
-                                client3_3_entrylk_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_entrylk_req);
e3c68b
+                                client3_3_entrylk_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_entrylk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5349,8 +5384,8 @@ client3_3_fentrylk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FENTRYLK,
e3c68b
-                                client3_3_fentrylk_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_fentrylk_req);
e3c68b
+                                client3_3_fentrylk_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_fentrylk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5391,8 +5426,7 @@ client3_3_rchecksum(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_RCHECKSUM, client3_3_rchecksum_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfs3_rchecksum_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfs3_rchecksum_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5433,10 +5467,12 @@ client3_3_readdir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         {0},
e3c68b
     };
e3c68b
     int readdir_rsp_size = 0;
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
     conf = this->private;
e3c68b
 
e3c68b
@@ -5486,9 +5522,11 @@ client3_3_readdir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
 
e3c68b
+    cp.rsphdr = rsphdr;
e3c68b
+    cp.rsphdr_cnt = count;
e3c68b
+    cp.rsp_iobref = rsp_iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_READDIR,
e3c68b
-                                client3_3_readdir_cbk, NULL, rsphdr, count,
e3c68b
-                                NULL, 0, rsp_iobref,
e3c68b
+                                client3_3_readdir_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfs3_readdir_req);
e3c68b
 
e3c68b
     if (ret) {
e3c68b
@@ -5534,10 +5572,12 @@ client3_3_readdirp(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         {0},
e3c68b
     };
e3c68b
     clnt_local_t *local = NULL;
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
     conf = this->private;
e3c68b
 
e3c68b
@@ -5587,9 +5627,11 @@ client3_3_readdirp(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
 
e3c68b
     local->fd = fd_ref(args->fd);
e3c68b
 
e3c68b
+    cp.rsphdr = rsphdr;
e3c68b
+    cp.rsphdr_cnt = count;
e3c68b
+    cp.rsp_iobref = rsp_iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_READDIRP,
e3c68b
-                                client3_3_readdirp_cbk, NULL, rsphdr, count,
e3c68b
-                                NULL, 0, rsp_iobref,
e3c68b
+                                client3_3_readdirp_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfs3_readdirp_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -5637,8 +5679,8 @@ client3_3_setattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_SETATTR,
e3c68b
-                                client3_3_setattr_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_setattr_req);
e3c68b
+                                client3_3_setattr_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_setattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5679,8 +5721,8 @@ client3_3_fsetattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FSETATTR,
e3c68b
-                                client3_3_fsetattr_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_fsetattr_req);
e3c68b
+                                client3_3_fsetattr_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_fsetattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5722,8 +5764,7 @@ client3_3_fallocate(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_FALLOCATE, client3_3_fallocate_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfs3_fallocate_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfs3_fallocate_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5764,8 +5805,8 @@ client3_3_discard(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_DISCARD,
e3c68b
-                                client3_3_discard_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_discard_req);
e3c68b
+                                client3_3_discard_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_discard_req);
e3c68b
     if (ret)
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5807,8 +5848,8 @@ client3_3_zerofill(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_ZEROFILL,
e3c68b
-                                client3_3_zerofill_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_zerofill_req);
e3c68b
+                                client3_3_zerofill_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_zerofill_req);
e3c68b
     if (ret)
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5850,7 +5891,7 @@ client3_3_ipc(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_IPC,
e3c68b
-                                client3_3_ipc_cbk, NULL, NULL, 0, NULL, 0, NULL,
e3c68b
+                                client3_3_ipc_cbk, NULL,
e3c68b
                                 (xdrproc_t)xdr_gfs3_ipc_req);
e3c68b
     if (ret)
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -5895,8 +5936,8 @@ client3_3_seek(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_SEEK,
e3c68b
-                                client3_3_seek_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfs3_seek_req);
e3c68b
+                                client3_3_seek_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfs3_seek_req);
e3c68b
     if (ret)
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -6083,8 +6124,7 @@ client3_3_getactivelk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_GETACTIVELK, client3_3_getactivelk_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfs3_getactivelk_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfs3_getactivelk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -6141,8 +6181,7 @@ client3_3_setactivelk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_SETACTIVELK, client3_3_setactivelk_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfs3_setactivelk_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfs3_setactivelk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
diff --git a/xlators/protocol/client/src/client-rpc-fops_v2.c b/xlators/protocol/client/src/client-rpc-fops_v2.c
e3c68b
index 8f3ee41..2673b6e 100644
e3c68b
--- a/xlators/protocol/client/src/client-rpc-fops_v2.c
e3c68b
+++ b/xlators/protocol/client/src/client-rpc-fops_v2.c
e3c68b
@@ -3005,11 +3005,13 @@ client4_0_lookup(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     struct iobref *rsp_iobref = NULL;
e3c68b
     struct iobuf *rsp_iobuf = NULL;
e3c68b
     struct iovec *rsphdr = NULL;
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
     memset(vector, 0, sizeof(vector));
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
 
e3c68b
     conf = this->private;
e3c68b
     args = data;
e3c68b
@@ -3059,9 +3061,12 @@ client4_0_lookup(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         op_errno = -ret;
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
+
e3c68b
+    cp.rsphdr = rsphdr;
e3c68b
+    cp.rsphdr_cnt = count;
e3c68b
+    cp.rsp_iobref = local->iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_LOOKUP,
e3c68b
-                                client4_0_lookup_cbk, NULL, rsphdr, count, NULL,
e3c68b
-                                0, local->iobref,
e3c68b
+                                client4_0_lookup_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfx_lookup_req);
e3c68b
 
e3c68b
     if (ret) {
e3c68b
@@ -3109,8 +3114,8 @@ client4_0_stat(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_STAT,
e3c68b
-                                client4_0_stat_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_stat_req);
e3c68b
+                                client4_0_stat_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_stat_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3153,8 +3158,8 @@ client4_0_truncate(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_TRUNCATE,
e3c68b
-                                client4_0_truncate_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_truncate_req);
e3c68b
+                                client4_0_truncate_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_truncate_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3198,8 +3203,7 @@ client4_0_ftruncate(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_FTRUNCATE, client4_0_ftruncate_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfx_ftruncate_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfx_ftruncate_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3241,8 +3245,8 @@ client4_0_access(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_ACCESS,
e3c68b
-                                client4_0_access_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_access_req);
e3c68b
+                                client4_0_access_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_access_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3295,8 +3299,8 @@ client4_0_readlink(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_READLINK,
e3c68b
-                                client4_0_readlink_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_readlink_req);
e3c68b
+                                client4_0_readlink_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_readlink_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3338,8 +3342,8 @@ client4_0_unlink(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_UNLINK,
e3c68b
-                                client4_0_unlink_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_unlink_req);
e3c68b
+                                client4_0_unlink_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_unlink_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3381,8 +3385,8 @@ client4_0_rmdir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_RMDIR,
e3c68b
-                                client4_0_rmdir_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_rmdir_req);
e3c68b
+                                client4_0_rmdir_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_rmdir_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3440,8 +3444,8 @@ client4_0_symlink(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_SYMLINK,
e3c68b
-                                client4_0_symlink_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_symlink_req);
e3c68b
+                                client4_0_symlink_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_symlink_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3486,8 +3490,8 @@ client4_0_rename(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_RENAME,
e3c68b
-                                client4_0_rename_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_rename_req);
e3c68b
+                                client4_0_rename_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_rename_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3546,8 +3550,8 @@ client4_0_link(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     loc_path(&local->loc2, NULL);
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_LINK,
e3c68b
-                                client4_0_link_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_link_req);
e3c68b
+                                client4_0_link_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_link_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3601,8 +3605,8 @@ client4_0_mknod(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_MKNOD,
e3c68b
-                                client4_0_mknod_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_mknod_req);
e3c68b
+                                client4_0_mknod_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_mknod_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3668,8 +3672,8 @@ client4_0_mkdir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_MKDIR,
e3c68b
-                                client4_0_mkdir_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_mkdir_req);
e3c68b
+                                client4_0_mkdir_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_mkdir_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3726,8 +3730,8 @@ client4_0_create(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_CREATE,
e3c68b
-                                client4_0_create_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_create_req);
e3c68b
+                                client4_0_create_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_create_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3787,8 +3791,8 @@ client4_0_open(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_OPEN,
e3c68b
-                                client4_0_open_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_open_req);
e3c68b
+                                client4_0_open_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_open_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3823,10 +3827,12 @@ client4_0_readv(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     };
e3c68b
     struct iobuf *rsp_iobuf = NULL;
e3c68b
     struct iobref *rsp_iobref = NULL;
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
     conf = this->private;
e3c68b
 
e3c68b
@@ -3872,9 +3878,12 @@ client4_0_readv(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
 
e3c68b
+    cp.rsp_payload = &rsp_vec;
e3c68b
+    cp.rsp_payload_cnt = 1;
e3c68b
+    cp.rsp_iobref = local->iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_READ,
e3c68b
-                                client4_0_readv_cbk, NULL, NULL, 0, &rsp_vec, 1,
e3c68b
-                                local->iobref, (xdrproc_t)xdr_gfx_read_req);
e3c68b
+                                client4_0_readv_cbk, &cp,
e3c68b
+                                (xdrproc_t)xdr_gfx_read_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -3905,10 +3914,12 @@ client4_0_writev(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     };
e3c68b
     int op_errno = ESTALE;
e3c68b
     int ret = 0;
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
     conf = this->private;
e3c68b
 
e3c68b
@@ -3926,9 +3937,11 @@ client4_0_writev(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
 
e3c68b
+    cp.iobref = args->iobref;
e3c68b
+    cp.payload = args->vector;
e3c68b
+    cp.payload_cnt = args->count;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_WRITE,
e3c68b
-                                client4_0_writev_cbk, args->iobref,
e3c68b
-                                args->vector, args->count, NULL, 0, NULL,
e3c68b
+                                client4_0_writev_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfx_write_req);
e3c68b
     if (ret) {
e3c68b
         /*
e3c68b
@@ -3987,8 +4000,8 @@ client4_0_flush(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FLUSH,
e3c68b
-                                client4_0_flush_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_flush_req);
e3c68b
+                                client4_0_flush_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_flush_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4030,8 +4043,8 @@ client4_0_fsync(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FSYNC,
e3c68b
-                                client4_0_fsync_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_fsync_req);
e3c68b
+                                client4_0_fsync_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_fsync_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4075,8 +4088,8 @@ client4_0_fstat(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FSTAT,
e3c68b
-                                client4_0_fstat_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_fstat_req);
e3c68b
+                                client4_0_fstat_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_fstat_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4130,8 +4143,8 @@ client4_0_opendir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_OPENDIR,
e3c68b
-                                client4_0_opendir_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_opendir_req);
e3c68b
+                                client4_0_opendir_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_opendir_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4175,8 +4188,8 @@ client4_0_fsyncdir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FSYNCDIR,
e3c68b
-                                client4_0_fsyncdir_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_fsyncdir_req);
e3c68b
+                                client4_0_fsyncdir_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_fsyncdir_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4219,8 +4232,8 @@ client4_0_statfs(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_STATFS,
e3c68b
-                                client4_0_statfs_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_statfs_req);
e3c68b
+                                client4_0_statfs_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_statfs_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4263,8 +4276,8 @@ client4_0_setxattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_SETXATTR,
e3c68b
-                                client4_0_setxattr_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_setxattr_req);
e3c68b
+                                client4_0_setxattr_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_setxattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4310,8 +4323,7 @@ client4_0_fsetxattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_FSETXATTR, client4_0_fsetxattr_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfx_fsetxattr_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfx_fsetxattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4364,8 +4376,7 @@ client4_0_fgetxattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_FGETXATTR, client4_0_fgetxattr_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfx_fgetxattr_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfx_fgetxattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4452,8 +4463,8 @@ client4_0_getxattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_GETXATTR,
e3c68b
-                                client4_0_getxattr_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_getxattr_req);
e3c68b
+                                client4_0_getxattr_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_getxattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4514,8 +4525,8 @@ client4_0_xattrop(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_XATTROP,
e3c68b
-                                client4_0_xattrop_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_xattrop_req);
e3c68b
+                                client4_0_xattrop_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_xattrop_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4566,8 +4577,8 @@ client4_0_fxattrop(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FXATTROP,
e3c68b
-                                client4_0_fxattrop_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_fxattrop_req);
e3c68b
+                                client4_0_fxattrop_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_fxattrop_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4613,8 +4624,7 @@ client4_0_removexattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_REMOVEXATTR, client4_0_removexattr_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfx_removexattr_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfx_removexattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4656,10 +4666,9 @@ client4_0_fremovexattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         op_errno = -ret;
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
-    ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
-                                GFS3_OP_FREMOVEXATTR,
e3c68b
-                                client4_0_fremovexattr_cbk, NULL, NULL, 0, NULL,
e3c68b
-                                0, NULL, (xdrproc_t)xdr_gfx_fremovexattr_req);
e3c68b
+    ret = client_submit_request(
e3c68b
+        this, &req, frame, conf->fops, GFS3_OP_FREMOVEXATTR,
e3c68b
+        client4_0_fremovexattr_cbk, NULL, (xdrproc_t)xdr_gfx_fremovexattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4701,8 +4710,8 @@ client4_0_lease(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_LEASE,
e3c68b
-                                client4_0_lease_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_lease_req);
e3c68b
+                                client4_0_lease_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_lease_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4764,7 +4773,7 @@ client4_0_lk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_LK,
e3c68b
-                                client4_0_lk_cbk, NULL, NULL, 0, NULL, 0, NULL,
e3c68b
+                                client4_0_lk_cbk, NULL,
e3c68b
                                 (xdrproc_t)xdr_gfx_lk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -4807,8 +4816,8 @@ client4_0_inodelk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_INODELK,
e3c68b
-                                client4_0_inodelk_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_inodelk_req);
e3c68b
+                                client4_0_inodelk_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_inodelk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4857,8 +4866,8 @@ client4_0_finodelk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FINODELK,
e3c68b
-                                client4_0_finodelk_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_finodelk_req);
e3c68b
+                                client4_0_finodelk_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_finodelk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4902,8 +4911,8 @@ client4_0_entrylk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_ENTRYLK,
e3c68b
-                                client4_0_entrylk_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_entrylk_req);
e3c68b
+                                client4_0_entrylk_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_entrylk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4946,8 +4955,8 @@ client4_0_fentrylk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FENTRYLK,
e3c68b
-                                client4_0_fentrylk_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_fentrylk_req);
e3c68b
+                                client4_0_fentrylk_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_fentrylk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -4988,10 +4997,12 @@ client4_0_readdir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         {0},
e3c68b
     };
e3c68b
     int readdir_rsp_size = 0;
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
     conf = this->private;
e3c68b
 
e3c68b
@@ -5041,9 +5052,11 @@ client4_0_readdir(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
 
e3c68b
+    cp.rsphdr = rsphdr;
e3c68b
+    cp.rsphdr_cnt = count;
e3c68b
+    cp.rsp_iobref = rsp_iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_READDIR,
e3c68b
-                                client4_0_readdir_cbk, NULL, rsphdr, count,
e3c68b
-                                NULL, 0, rsp_iobref,
e3c68b
+                                client4_0_readdir_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfx_readdir_req);
e3c68b
 
e3c68b
     if (ret) {
e3c68b
@@ -5089,10 +5102,12 @@ client4_0_readdirp(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         {0},
e3c68b
     };
e3c68b
     clnt_local_t *local = NULL;
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
     conf = this->private;
e3c68b
 
e3c68b
@@ -5142,9 +5157,11 @@ client4_0_readdirp(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
 
e3c68b
     local->fd = fd_ref(args->fd);
e3c68b
 
e3c68b
+    cp.rsphdr = rsphdr;
e3c68b
+    cp.rsphdr_cnt = count;
e3c68b
+    cp.rsp_iobref = rsp_iobref;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_READDIRP,
e3c68b
-                                client4_0_readdirp_cbk, NULL, rsphdr, count,
e3c68b
-                                NULL, 0, rsp_iobref,
e3c68b
+                                client4_0_readdirp_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfx_readdirp_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -5192,8 +5209,8 @@ client4_0_setattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_SETATTR,
e3c68b
-                                client4_0_setattr_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_setattr_req);
e3c68b
+                                client4_0_setattr_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_setattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5235,8 +5252,7 @@ client4_0_fallocate(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_FALLOCATE, client4_0_fallocate_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfx_fallocate_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfx_fallocate_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5277,8 +5293,8 @@ client4_0_discard(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_DISCARD,
e3c68b
-                                client4_0_discard_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_discard_req);
e3c68b
+                                client4_0_discard_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_discard_req);
e3c68b
     if (ret)
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5320,8 +5336,8 @@ client4_0_zerofill(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_ZEROFILL,
e3c68b
-                                client4_0_zerofill_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_zerofill_req);
e3c68b
+                                client4_0_zerofill_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_zerofill_req);
e3c68b
     if (ret)
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5363,7 +5379,7 @@ client4_0_ipc(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_IPC,
e3c68b
-                                client4_0_ipc_cbk, NULL, NULL, 0, NULL, 0, NULL,
e3c68b
+                                client4_0_ipc_cbk, NULL,
e3c68b
                                 (xdrproc_t)xdr_gfx_ipc_req);
e3c68b
     if (ret)
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
@@ -5408,8 +5424,8 @@ client4_0_seek(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     }
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_SEEK,
e3c68b
-                                client4_0_seek_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_seek_req);
e3c68b
+                                client4_0_seek_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_seek_req);
e3c68b
     if (ret)
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5458,8 +5474,7 @@ client4_0_getactivelk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_GETACTIVELK, client4_0_getactivelk_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfx_getactivelk_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfx_getactivelk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5514,8 +5529,7 @@ client4_0_setactivelk(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
 
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
                                 GFS3_OP_SETACTIVELK, client4_0_setactivelk_cbk,
e3c68b
-                                NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-                                (xdrproc_t)xdr_gfx_setactivelk_req);
e3c68b
+                                NULL, (xdrproc_t)xdr_gfx_setactivelk_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5785,8 +5799,8 @@ client4_0_namelink(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
 
e3c68b
     dict_to_xdr(args->xdata, &req.xdata);
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_NAMELINK,
e3c68b
-                                client4_namelink_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_namelink_req);
e3c68b
+                                client4_namelink_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_namelink_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -5837,8 +5851,8 @@ client4_0_icreate(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     op_errno = ESTALE;
e3c68b
     dict_to_xdr(args->xdata, &req.xdata);
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_ICREATE,
e3c68b
-                                client4_icreate_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_icreate_req);
e3c68b
+                                client4_icreate_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_icreate_req);
e3c68b
     if (ret)
e3c68b
         goto free_reqdata;
e3c68b
     GF_FREE(req.xdata.pairs.pairs_val);
e3c68b
@@ -5864,10 +5878,12 @@ client4_0_put(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     int op_errno = ESTALE;
e3c68b
     int ret = 0;
e3c68b
     clnt_local_t *local = NULL;
e3c68b
+    client_payload_t cp;
e3c68b
 
e3c68b
     if (!frame || !this || !data)
e3c68b
         goto unwind;
e3c68b
 
e3c68b
+    memset(&cp, 0, sizeof(client_payload_t));
e3c68b
     args = data;
e3c68b
     conf = this->private;
e3c68b
 
e3c68b
@@ -5890,9 +5906,11 @@ client4_0_put(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
 
e3c68b
+    cp.iobref = args->iobref;
e3c68b
+    cp.payload = args->vector;
e3c68b
+    cp.payload_cnt = args->count;
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_PUT,
e3c68b
-                                client4_0_put_cbk, args->iobref, args->vector,
e3c68b
-                                args->count, NULL, 0, NULL,
e3c68b
+                                client4_0_put_cbk, &cp,
e3c68b
                                 (xdrproc_t)xdr_gfx_put_req);
e3c68b
     if (ret) {
e3c68b
         /*
e3c68b
@@ -5959,10 +5977,10 @@ client4_0_copy_file_range(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
     local->attempt_reopen_out = client_is_reopen_needed(args->fd_out, this,
e3c68b
                                                         req.fd_out);
e3c68b
 
e3c68b
-    ret = client_submit_request(
e3c68b
-        this, &req, frame, conf->fops, GFS3_OP_COPY_FILE_RANGE,
e3c68b
-        client4_0_copy_file_range_cbk, NULL, NULL, 0, NULL, 0, NULL,
e3c68b
-        (xdrproc_t)xdr_gfx_copy_file_range_req);
e3c68b
+    ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
+                                GFS3_OP_COPY_FILE_RANGE,
e3c68b
+                                client4_0_copy_file_range_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_copy_file_range_req);
e3c68b
     if (ret) {
e3c68b
         /*
e3c68b
          * If the lower layers fail to submit a request, they'll also
e3c68b
@@ -6009,8 +6027,8 @@ client4_0_fsetattr(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
         goto unwind;
e3c68b
     }
e3c68b
     ret = client_submit_request(this, &req, frame, conf->fops, GFS3_OP_FSETATTR,
e3c68b
-                                client4_0_fsetattr_cbk, NULL, NULL, 0, NULL, 0,
e3c68b
-                                NULL, (xdrproc_t)xdr_gfx_fsetattr_req);
e3c68b
+                                client4_0_fsetattr_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_fsetattr_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
@@ -6054,9 +6072,9 @@ client4_0_rchecksum(call_frame_t *frame, xlator_t *this, void *data)
e3c68b
 
e3c68b
     dict_to_xdr(args->xdata, &req.xdata);
e3c68b
 
e3c68b
-    ret = client_submit_request(
e3c68b
-        this, &req, frame, conf->fops, GFS3_OP_RCHECKSUM, client4_rchecksum_cbk,
e3c68b
-        NULL, NULL, 0, NULL, 0, NULL, (xdrproc_t)xdr_gfx_rchecksum_req);
e3c68b
+    ret = client_submit_request(this, &req, frame, conf->fops,
e3c68b
+                                GFS3_OP_RCHECKSUM, client4_rchecksum_cbk, NULL,
e3c68b
+                                (xdrproc_t)xdr_gfx_rchecksum_req);
e3c68b
     if (ret) {
e3c68b
         gf_msg(this->name, GF_LOG_WARNING, 0, PC_MSG_FOP_SEND_FAILED,
e3c68b
                "failed to send the fop");
e3c68b
diff --git a/xlators/protocol/client/src/client.c b/xlators/protocol/client/src/client.c
e3c68b
index dea6c28..2d75714 100644
e3c68b
--- a/xlators/protocol/client/src/client.c
e3c68b
+++ b/xlators/protocol/client/src/client.c
e3c68b
@@ -131,10 +131,7 @@ client_type_to_gf_type(short l_type)
e3c68b
 int
e3c68b
 client_submit_request(xlator_t *this, void *req, call_frame_t *frame,
e3c68b
                       rpc_clnt_prog_t *prog, int procnum, fop_cbk_fn_t cbkfn,
e3c68b
-                      struct iobref *iobref, struct iovec *payload,
e3c68b
-                      int payloadcnt, struct iovec *rsp_payload,
e3c68b
-                      int rsp_payload_count, struct iobref *rsp_iobref,
e3c68b
-                      xdrproc_t xdrproc)
e3c68b
+                      client_payload_t *cp, xdrproc_t xdrproc)
e3c68b
 {
e3c68b
     int ret = -1;
e3c68b
     clnt_conf_t *conf = NULL;
e3c68b
@@ -180,8 +177,8 @@ client_submit_request(xlator_t *this, void *req, call_frame_t *frame,
e3c68b
             goto out;
e3c68b
         }
e3c68b
 
e3c68b
-        if (iobref != NULL) {
e3c68b
-            ret = iobref_merge(new_iobref, iobref);
e3c68b
+        if (cp && cp->iobref != NULL) {
e3c68b
+            ret = iobref_merge(new_iobref, cp->iobref);
e3c68b
             if (ret != 0) {
e3c68b
                 gf_msg(this->name, GF_LOG_WARNING, ENOMEM, PC_MSG_NO_MEMORY,
e3c68b
                        "cannot merge "
e3c68b
@@ -224,9 +221,16 @@ client_submit_request(xlator_t *this, void *req, call_frame_t *frame,
e3c68b
     }
e3c68b
 
e3c68b
     /* Send the msg */
e3c68b
-    ret = rpc_clnt_submit(conf->rpc, prog, procnum, cbkfn, &iov, count, payload,
e3c68b
-                          payloadcnt, new_iobref, frame, payload, payloadcnt,
e3c68b
-                          rsp_payload, rsp_payload_count, rsp_iobref);
e3c68b
+    if (cp) {
e3c68b
+        ret = rpc_clnt_submit(conf->rpc, prog, procnum, cbkfn, &iov, count,
e3c68b
+                              cp->payload, cp->payload_cnt, new_iobref, frame,
e3c68b
+                              cp->rsphdr, cp->rsphdr_cnt, cp->rsp_payload,
e3c68b
+                              cp->rsp_payload_cnt, cp->rsp_iobref);
e3c68b
+    } else {
e3c68b
+        ret = rpc_clnt_submit(conf->rpc, prog, procnum, cbkfn, &iov, count,
e3c68b
+                              NULL, 0, new_iobref, frame, NULL, 0, NULL, 0,
e3c68b
+                              NULL);
e3c68b
+    }
e3c68b
 
e3c68b
     if (ret < 0) {
e3c68b
         gf_msg_debug(this->name, 0, "rpc_clnt_submit failed");
e3c68b
diff --git a/xlators/protocol/client/src/client.h b/xlators/protocol/client/src/client.h
e3c68b
index 71f84f3..f12fa61 100644
e3c68b
--- a/xlators/protocol/client/src/client.h
e3c68b
+++ b/xlators/protocol/client/src/client.h
e3c68b
@@ -345,6 +345,17 @@ typedef struct client_args {
e3c68b
     lock_migration_info_t *locklist;
e3c68b
 } clnt_args_t;
e3c68b
 
e3c68b
+typedef struct client_payload {
e3c68b
+    struct iobref *iobref;
e3c68b
+    struct iovec *payload;
e3c68b
+    struct iovec *rsphdr;
e3c68b
+    struct iovec *rsp_payload;
e3c68b
+    struct iobref *rsp_iobref;
e3c68b
+    int payload_cnt;
e3c68b
+    int rsphdr_cnt;
e3c68b
+    int rsp_payload_cnt;
e3c68b
+} client_payload_t;
e3c68b
+
e3c68b
 typedef ssize_t (*gfs_serialize_t)(struct iovec outmsg, void *args);
e3c68b
 
e3c68b
 clnt_fd_ctx_t *
e3c68b
@@ -359,10 +370,7 @@ client_local_wipe(clnt_local_t *local);
e3c68b
 int
e3c68b
 client_submit_request(xlator_t *this, void *req, call_frame_t *frame,
e3c68b
                       rpc_clnt_prog_t *prog, int procnum, fop_cbk_fn_t cbk,
e3c68b
-                      struct iobref *iobref, struct iovec *rsphdr,
e3c68b
-                      int rsphdr_count, struct iovec *rsp_payload,
e3c68b
-                      int rsp_count, struct iobref *rsp_iobref,
e3c68b
-                      xdrproc_t xdrproc);
e3c68b
+                      client_payload_t *cp, xdrproc_t xdrproc);
e3c68b
 
e3c68b
 int
e3c68b
 client_submit_compound_request(xlator_t *this, void *req, call_frame_t *frame,
e3c68b
-- 
e3c68b
1.8.3.1
e3c68b