summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-quota.c
diff options
context:
space:
mode:
authorRaghavendra G <rgowdapp@redhat.com>2013-12-23 14:54:05 +0530
committerVijay Bellur <vbellur@redhat.com>2014-01-25 09:10:12 -0800
commitf05607fe05f7189dc65a6f328f83db0cbb946426 (patch)
treeb4c7b1730a8b64a9d26833be7dbfa20ff68f62d0 /xlators/mgmt/glusterd/src/glusterd-quota.c
parenta10100a4b8501d15c83b416b932d8d786ea550fb (diff)
mgmt/glusterd: make sure quota enforcer has established connection with quotad before marking quota as enabled.
without this patch there is a window of time when quota is marked as enabled in quota-enforcer, but connection to quotad wouldn't have been established. Any checklimit done during this period can result in a failed fop because of unavailability of quotad. Change-Id: I0d509fabc434dd55ce9ec59157123524197fcc80 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> BUG: 969461 Signed-off-by: Raghavendra G <rgowdapp@redhat.com> Reviewed-on: http://review.gluster.org/6572 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-quota.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-quota.c19
1 files changed, 6 insertions, 13 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-quota.c b/xlators/mgmt/glusterd/src/glusterd-quota.c
index ffde532bdcd..d13533aa6c1 100644
--- a/xlators/mgmt/glusterd/src/glusterd-quota.c
+++ b/xlators/mgmt/glusterd/src/glusterd-quota.c
@@ -996,14 +996,6 @@ glusterd_quotad_op (int opcode)
ret = glusterd_check_generate_start_quotad ();
break;
- case GF_QUOTA_OPTION_TYPE_DEFAULT_SOFT_LIMIT:
- case GF_QUOTA_OPTION_TYPE_HARD_TIMEOUT:
- case GF_QUOTA_OPTION_TYPE_SOFT_TIMEOUT:
- case GF_QUOTA_OPTION_TYPE_ALERT_TIME:
-
- ret = glusterd_reconfigure_quotad ();
- break;
-
default:
ret = 0;
break;
@@ -1131,6 +1123,12 @@ glusterd_op_quota (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
goto out;
}
+ if (priv->op_version > GD_OP_VERSION_MIN) {
+ ret = glusterd_quotad_op (type);
+ if (ret)
+ goto out;
+ }
+
ret = glusterd_create_volfiles_and_notify_services (volinfo);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "Unable to re-create "
@@ -1151,11 +1149,6 @@ glusterd_op_quota (dict_t *dict, char **op_errstr, dict_t *rsp_dict)
if (rsp_dict && start_crawl == _gf_true)
glusterd_quota_initiate_fs_crawl (priv, volname, type);
- if (priv->op_version > GD_OP_VERSION_MIN) {
- ret = glusterd_quotad_op (type);
- if (ret)
- goto out;
- }
ret = 0;
out:
return ret;