From 4c5e364c36baa92374eb0eac60dafb8da3786286 Mon Sep 17 00:00:00 2001 From: shishir gowda Date: Wed, 1 Sep 2010 23:44:54 +0000 Subject: 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 Signed-off-by: Vijay Bellur BUG: 1486 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1486 --- rpc/xdr/src/cli1-xdr.c | 2 ++ rpc/xdr/src/cli1-xdr.h | 1 + rpc/xdr/src/cli1.x | 1 + 3 files changed, 4 insertions(+) (limited to 'rpc') 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 { -- cgit