diff options
author | Junaid <junaid@gluster.com> | 2011-06-21 00:51:25 +0000 |
---|---|---|
committer | Anand Avati <avati@gluster.com> | 2011-06-22 08:40:36 -0700 |
commit | 1d85e0dc80c19645f924c8fcbbb32c53ef09e701 (patch) | |
tree | b233847fcb6ceea478b7f650e974ffa41350eaea /xlators/mgmt | |
parent | 71a13f09978dc3858b9dd2771f605582e0c2e0dd (diff) |
mgmt/glusterd: Enable quota only when volume is started.
Signed-off-by: Junaid <junaid@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
Diffstat (limited to 'xlators/mgmt')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-op-sm.c | 6 |
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 def51b101..0cf94171c 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -5084,6 +5084,12 @@ glusterd_quota_enable (glusterd_volinfo_t *volinfo, char **op_errstr, GF_VALIDATE_OR_GOTO ("glusterd", crawl, out); GF_VALIDATE_OR_GOTO ("glusterd", op_errstr, out); + if (glusterd_is_volume_started (volinfo) == 0) { + *op_errstr = gf_strdup ("Volume is stopped, start volume " + "to enable quota."); + goto out; + } + ret = glusterd_check_if_quota_trans_enabled (volinfo); if (ret == 0) { *op_errstr = gf_strdup ("Quota is already enabled"); |