summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
diff options
context:
space:
mode:
authorKaushal M <kaushal@redhat.com>2013-07-24 18:34:38 +0530
committerAnand Avati <avati@redhat.com>2013-09-13 12:11:35 -0700
commit67b0e817720eb95aee706a11fdf4633607aacd82 (patch)
treebbadc06f521cdb492b55dca580111b311206f6be /xlators/mgmt/glusterd/src/glusterd-volume-ops.c
parentd9dde294cfd7bb83bccbe777dfd58b925a6f2f7b (diff)
glusterd: Use volume op-versions during volgen
Backport of '3af61d6 glusterd: Use volume op-versions during volgen' from master 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. BUG: 990830 Change-Id: I07e4a34004816c803fcbb3ee1ddd4b1e4c3a8006 Signed-off-by: Kaushal M <kaushal@redhat.com> Reviewed-on: http://review.gluster.org/5831 Reviewed-by: Krutika Dhananjay <kdhananj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Anand Avati <avati@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-volume-ops.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-volume-ops.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
index 5b93410b5f0..1cbe0c8acf9 100644
--- a/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
+++ b/xlators/mgmt/glusterd/src/glusterd-volume-ops.c
@@ -1634,6 +1634,8 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr)
i++;
}
+ gd_update_volume_op_versions (volinfo);
+
ret = glusterd_store_volinfo (volinfo, GLUSTERD_VOLINFO_VER_AC_INCREMENT);
if (ret) {
glusterd_store_delete_volume (volinfo);
@@ -1651,7 +1653,6 @@ glusterd_op_create_volume (dict_t *dict, char **op_errstr)
list_add_tail (&volinfo->vol_list, &priv->volumes);
vol_added = _gf_true;
- gd_update_volume_op_versions (volinfo);
out:
GF_FREE(free_ptr);
if (!vol_added && volinfo)