summaryrefslogtreecommitdiffstats
path: root/cli/src/cli.c
diff options
context:
space:
mode:
authorshishir gowda <shishirng@gluster.com>2011-07-29 16:36:27 +0530
committerAnand Avati <avati@gluster.com>2011-07-31 23:15:32 -0700
commitdf0a72d9c118c2a1146f2787eee6d5f0a58853f0 (patch)
treefc6eb998d3e3965610aef473a1f6b3e46cf2fb7c /cli/src/cli.c
parent76acac485b9f06f36d145b4c31fa6f4da3c70f52 (diff)
Variable IOBUF: Use variable iobuf for cli/glusterd/glusterfsd(mgmt)
By using variable iobufs, xfer data size is no more limited to 128K (default). This helps in scaling. Change-Id: Iab453db9223d887306d150cd6fe0b1eae9c422cc BUG: 2472 Reviewed-on: http://review.gluster.com/13 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Amar Tumballi <amar@gluster.com> Reviewed-by: Anand Avati <avati@gluster.com>
Diffstat (limited to 'cli/src/cli.c')
-rw-r--r--cli/src/cli.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/cli/src/cli.c b/cli/src/cli.c
index 8a06c8abd76..0e904a15e45 100644
--- a/cli/src/cli.c
+++ b/cli/src/cli.c
@@ -266,7 +266,7 @@ cli_submit_request (void *req, call_frame_t *frame,
rpc_clnt_prog_t *prog,
int procnum, struct iobref *iobref,
cli_serialize_t sfunc, xlator_t *this,
- fop_cbk_fn_t cbkfn)
+ fop_cbk_fn_t cbkfn, xdrproc_t xdrproc)
{
int ret = -1;
int count = 0;
@@ -274,10 +274,12 @@ cli_submit_request (void *req, call_frame_t *frame,
struct iovec iov = {0, };
struct iobuf *iobuf = NULL;
char new_iobref = 0;
+ ssize_t xdr_size = 0;
GF_ASSERT (this);
- iobuf = iobuf_get (this->ctx->iobuf_pool);
+ xdr_size = xdr_sizeof (xdrproc, req);
+ iobuf = iobuf_get2 (this->ctx->iobuf_pool, xdr_size);
if (!iobuf) {
goto out;
};
@@ -294,7 +296,7 @@ cli_submit_request (void *req, call_frame_t *frame,
iobref_add (iobref, iobuf);
iov.iov_base = iobuf->ptr;
- iov.iov_len = 128 * GF_UNIT_KB;
+ iov.iov_len = iobuf_size (iobuf);
/* Create the xdr payload */