summaryrefslogtreecommitdiffstats
path: root/rpc/xdr/src/cli1-xdr.c
diff options
context:
space:
mode:
authorMohammed Junaid Ahmed <junaid@gluster.com>2011-03-15 05:36:33 +0000
committerVijay Bellur <vijay@dev.gluster.com>2011-03-16 00:04:44 -0700
commit8221c3cae1ce5c2f7d897e5637591c5437aeea69 (patch)
treeace43c4a317db448560410e4c252d78c72ea61db /rpc/xdr/src/cli1-xdr.c
parent7d61416a443b1786158c6236f182b6c11b3619f7 (diff)
rpc: QUOTA rpc related changes.
Signed-off-by: Junaid <junaid@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 2473 (Support for volume and directory level quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2473
Diffstat (limited to 'rpc/xdr/src/cli1-xdr.c')
-rw-r--r--rpc/xdr/src/cli1-xdr.c40
1 files changed, 39 insertions, 1 deletions
diff --git a/rpc/xdr/src/cli1-xdr.c b/rpc/xdr/src/cli1-xdr.c
index ba58992d8..c51546a8e 100644
--- a/rpc/xdr/src/cli1-xdr.c
+++ b/rpc/xdr/src/cli1-xdr.c
@@ -45,6 +45,15 @@ xdr_gf1_cli_replace_op (XDR *xdrs, gf1_cli_replace_op *objp)
}
bool_t
+xdr_gf_quota_type (XDR *xdrs, gf_quota_type *objp)
+{
+
+ if (!xdr_enum (xdrs, (enum_t *) objp))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
xdr_gf1_cli_friends_list (XDR *xdrs, gf1_cli_friends_list *objp)
{
@@ -114,7 +123,6 @@ xdr_gf1_cli_probe_rsp (XDR *xdrs, gf1_cli_probe_rsp *objp)
{
register int32_t *buf;
-
if (xdrs->x_op == XDR_ENCODE) {
buf = XDR_INLINE (xdrs, 3 * BYTES_PER_XDR_UNIT);
if (buf == NULL) {
@@ -530,6 +538,36 @@ xdr_gf1_cli_reset_vol_rsp (XDR *xdrs, gf1_cli_reset_vol_rsp *objp)
}
bool_t
+xdr_gf1_cli_quota_req (XDR *xdrs, gf1_cli_quota_req *objp)
+{
+
+ if (!xdr_string (xdrs, &objp->volname, ~0))
+ return FALSE;
+ if (!xdr_bytes (xdrs, (char **)&objp->dict.dict_val, (u_int *) &objp->dict.dict_len, ~0))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
+xdr_gf1_cli_quota_rsp (XDR *xdrs, gf1_cli_quota_rsp *objp)
+{
+
+ if (!xdr_int (xdrs, &objp->op_ret))
+ return FALSE;
+ if (!xdr_int (xdrs, &objp->op_errno))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->volname, ~0))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->op_errstr, ~0))
+ return FALSE;
+ if (!xdr_string (xdrs, &objp->limit_list, ~0))
+ return FALSE;
+ if (!xdr_gf_quota_type (xdrs, &objp->type))
+ return FALSE;
+ return TRUE;
+}
+
+bool_t
xdr_gf1_cli_set_vol_req (XDR *xdrs, gf1_cli_set_vol_req *objp)
{