summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c4
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.c2
2 files changed, 4 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 7a6d143e5de..f4e8ff8977e 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -3846,9 +3846,11 @@ glusterd_do_snap_vol (glusterd_volinfo_t *origin_vol, glusterd_snap_t *snap,
* and in-turn snapshot restore the barrier value is set to enable.
* Because of this further I/O on the mount point fails.
* Hence remove the barrier key from newly created snap volinfo
- * before storing and generating the brick volfiles.
+ * before storing and generating the brick volfiles. Also update
+ * the snap vol's version after removing the barrier key.
*/
dict_del (snap_vol->dict, "features.barrier");
+ gd_update_volume_op_versions (snap_vol);
ret = glusterd_store_volinfo (snap_vol,
GLUSTERD_VOLINFO_VER_AC_INCREMENT);
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.c b/xlators/mgmt/glusterd/src/glusterd-utils.c
index 216dff6e737..07ff79f6e53 100644
--- a/xlators/mgmt/glusterd/src/glusterd-utils.c
+++ b/xlators/mgmt/glusterd/src/glusterd-utils.c
@@ -571,7 +571,7 @@ glusterd_volinfo_dup (glusterd_volinfo_t *volinfo,
dict_copy (volinfo->dict, new_volinfo->dict);
dict_copy (volinfo->gsync_slaves, new_volinfo->gsync_slaves);
- gd_update_volume_op_versions (new_volinfo);
+ new_volinfo->op_version = volinfo->op_version;
if (set_userauth) {
glusterd_auth_set_username (new_volinfo,