summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRaghavendra Bhat <raghavendrabhat@gluster.com>2011-04-13 05:13:19 +0000
committerAnand Avati <avati@gluster.com>2011-04-13 06:29:05 -0700
commitefd0f26ba8116da1148c75c950f2490dbe42ebc5 (patch)
tree946251b19cf35d880cd607776906d51e53949df5
parent9c46226f7a98e843b1c95ecdcf44830e05d5e1f5 (diff)
glusterd: report the user if disable quota is given on already disabled quota
Signed-off-by: Raghavendra Bhat <raghavendrabhat@gluster.com> Signed-off-by: Anand Avati <avati@gluster.com> BUG: 2620 (CLI improvements in quota) URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=2620
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c6
1 files changed, 6 insertions, 0 deletions
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");