From fc86b3a22ab0519652f74ef8a75cf1cbfa290fb8 Mon Sep 17 00:00:00 2001 From: Anuradha Date: Thu, 24 Oct 2013 15:03:48 +0530 Subject: glusterd : Improved quota volume reset command Quota volume reset command without "force" option fixed, doesn't fail anymore. It resets unprotected fields and not the protected ones. Also, an appropriate message is provided to the user for the following cases : 1. only unprotected fields are reset, "force" option should be used to reset protected fields. 2. Both protected and unprotected fields are reset. 3. No field was reset, "force" option required. Test case for the same also added. Change-Id: I24e8f1be87b79ccd81bf6f933e00608b861c7a16 BUG: 1022905 Signed-off-by: Anuradha Reviewed-on: http://review.gluster.org/6135 Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Reviewed-by: Vijay Bellur --- cli/src/cli-rpc-ops.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'cli/src') diff --git a/cli/src/cli-rpc-ops.c b/cli/src/cli-rpc-ops.c index b1d9e6562..96984286f 100644 --- a/cli/src/cli-rpc-ops.c +++ b/cli/src/cli-rpc-ops.c @@ -1492,7 +1492,7 @@ gf_cli_reset_volume_cbk (struct rpc_req *req, struct iovec *iov, gf_log ("cli", GF_LOG_INFO, "Received resp to reset"); - if (rsp.op_ret && strcmp (rsp.op_errstr, "")) + if (strcmp (rsp.op_errstr, "")) snprintf (msg, sizeof (msg), "%s", rsp.op_errstr); else snprintf (msg, sizeof (msg), "reset volume %s", @@ -1510,7 +1510,7 @@ gf_cli_reset_volume_cbk (struct rpc_req *req, struct iovec *iov, if (rsp.op_ret) cli_err ("volume reset: failed: %s", msg); else - cli_out ("volume reset: success"); + cli_out ("volume reset: success: %s", msg); ret = rsp.op_ret; -- cgit