From efd0f26ba8116da1148c75c950f2490dbe42ebc5 Mon Sep 17 00:00:00 2001 From: Raghavendra Bhat Date: Wed, 13 Apr 2011 05:13:19 +0000 Subject: glusterd: report the user if disable quota is given on already disabled quota Signed-off-by: Raghavendra Bhat Signed-off-by: Anand Avati BUG: 2620 (CLI improvements in quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2620 --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index aaedf3d8761..df8388fbbaf 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -4428,6 +4428,12 @@ glusterd_quota_disable (glusterd_volinfo_t *volinfo, char **op_errstr) GF_VALIDATE_OR_GOTO ("glusterd", volinfo, out); GF_VALIDATE_OR_GOTO ("glusterd", op_errstr, out); + ret = glusterd_check_if_quota_trans_enabled (volinfo); + if (ret == -1) { + *op_errstr = gf_strdup ("Quota is already disabled"); + goto out; + } + quota_status = gf_strdup ("off"); if (!quota_status) { gf_log ("", GF_LOG_ERROR, "memory allocation failed"); -- cgit