summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-snapshot.c
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2014-06-05 04:44:25 +0000
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-06-10 23:27:06 -0700
commit7445593036e411ef96b741448fab89284f91e7f8 (patch)
tree079ce9ba22ce0b215e3646cd5a2e1e63b745de4f /xlators/mgmt/glusterd/src/glusterd-snapshot.c
parentec5d64eafcd77b1746b83173de16f7ec742af7a6 (diff)
glusterd/snapshot: Don't update the snap volume's op_version
After the features.barrier key is removed from the snap_vol dict, it's op_version should also be updated, so that it doesn't inherit the op_version of the original volume when it had the key set. Also in glusterd_volinfo_dup(), which duplicates volinfo the volume op_version should not be updated, rather the original volume's op_version should be used. Change-Id: Ib2250700f649e6c906b14aeccee5e78f71d69780 BUG: 1104944 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7986 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Atin Mukherjee <amukherj@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c4
1 files changed, 3 insertions, 1 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);