summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2013-07-24 18:34:38 +0530
committerVijay Bellur <vbellur@redhat.com>2013-08-02 02:28:46 -0700
commit3af61d6758bc41e7c461d9d54f0caf872870329c (patch)
treecad20969f32590404caad71fc6a31fefb8ac5244 /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parent36b102645ab66d141dcc831e67caa78966d45419 (diff)
glusterd: Use volume op-versions during volgen
Instead of using the cluster op-version, volume op-version is used to enable open-behind during volgen. For doing this, the volume op-versions are updated before regenerating the volfiles. Change-Id: I675bb549bf7c7c0279030dca698fb530781addc6 BUG: 990830 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5385 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Vijay Bellur <vbellur@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c9
1 files changed, 4 insertions, 5 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 1774b133b93..ca31bf0dcc7 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -1160,8 +1160,9 @@ glusterd_options_reset (glusterd_volinfo_t *volinfo, char *key,
_delete_reconfig_opt (volinfo->dict, key, value, is_force);
}
- ret = glusterd_create_volfiles_and_notify_services (volinfo);
+ gd_update_volume_op_versions (volinfo);
+ ret = glusterd_create_volfiles_and_notify_services (volinfo);
if (ret) {
gf_log (this->name, GF_LOG_ERROR, "Unable to create volfile for"
" 'volume reset'");
@@ -1337,8 +1338,6 @@ glusterd_op_reset_volume (dict_t *dict, char **op_errstr)
key);
}
- gd_update_volume_op_versions (volinfo);
-
out:
GF_FREE (key_fixed);
if (quorum_action)
@@ -1643,6 +1642,7 @@ glusterd_op_set_volume (dict_t *dict)
}
if (!global_opt) {
+ gd_update_volume_op_versions (volinfo);
ret = glusterd_create_volfiles_and_notify_services (volinfo);
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
@@ -1664,11 +1664,11 @@ glusterd_op_set_volume (dict_t *dict)
goto out;
}
}
- gd_update_volume_op_versions (volinfo);
} else {
list_for_each_entry (voliter, &priv->volumes, vol_list) {
volinfo = voliter;
+ gd_update_volume_op_versions (volinfo);
ret = glusterd_create_volfiles_and_notify_services (volinfo);
if (ret) {
gf_log (this->name, GF_LOG_ERROR,
@@ -1691,7 +1691,6 @@ glusterd_op_set_volume (dict_t *dict)
goto out;
}
}
- gd_update_volume_op_versions (volinfo);
}
}