diff options
author | shishir gowda <shishirng@gluster.com> | 2010-09-01 23:44:54 +0000 |
---|---|---|
committer | Vijay Bellur <vijay@dev.gluster.com> | 2010-09-02 03:12:25 -0700 |
commit | 4c5e364c36baa92374eb0eac60dafb8da3786286 (patch) | |
tree | 6712d972370fc7c8b375628cc8b37defb0be4730 /rpc/xdr | |
parent | 1d6e57d4a8bf4d69f724774d019f3cb7b4c0e1c3 (diff) |
Remove brick validation
Added checks for duplicate bricks in cli arguments, valid bricks
for the volume, valid volume name, and prevent removing of incorrect
pairs for replica.
Signed-off-by: shishir gowda <shishirng@gluster.com>
Signed-off-by: Vijay Bellur <vijay@dev.gluster.com>
BUG: 1486 ()
URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1486
Diffstat (limited to 'rpc/xdr')
-rw-r--r-- | rpc/xdr/src/cli1-xdr.c | 2 | ||||
-rw-r--r-- | rpc/xdr/src/cli1-xdr.h | 1 | ||||
-rw-r--r-- | rpc/xdr/src/cli1.x | 1 |
3 files changed, 4 insertions, 0 deletions
diff --git a/rpc/xdr/src/cli1-xdr.c b/rpc/xdr/src/cli1-xdr.c index c0d488e7f..22c00f2f7 100644 --- a/rpc/xdr/src/cli1-xdr.c +++ b/rpc/xdr/src/cli1-xdr.c @@ -415,6 +415,8 @@ xdr_gf1_cli_remove_brick_rsp (XDR *xdrs, gf1_cli_remove_brick_rsp *objp) return FALSE; if (!xdr_string (xdrs, &objp->volname, ~0)) return FALSE; + if (!xdr_string (xdrs, &objp->op_errstr, ~0)) + return FALSE; return TRUE; } diff --git a/rpc/xdr/src/cli1-xdr.h b/rpc/xdr/src/cli1-xdr.h index 64bae26f4..6f2f8d3e1 100644 --- a/rpc/xdr/src/cli1-xdr.h +++ b/rpc/xdr/src/cli1-xdr.h @@ -250,6 +250,7 @@ struct gf1_cli_remove_brick_rsp { int op_ret; int op_errno; char *volname; + char *op_errstr; }; typedef struct gf1_cli_remove_brick_rsp gf1_cli_remove_brick_rsp; diff --git a/rpc/xdr/src/cli1.x b/rpc/xdr/src/cli1.x index 0c4cbf833..9912f750b 100644 --- a/rpc/xdr/src/cli1.x +++ b/rpc/xdr/src/cli1.x @@ -169,6 +169,7 @@ struct gf1_cli_get_vol_rsp { int op_ret; int op_errno; string volname<>; + string op_errstr<>; } ; struct gf1_cli_replace_brick_req { |