summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.c
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2015-10-15 16:08:03 +0530
committerRajesh Joseph <rjoseph@redhat.com>2015-10-27 02:06:27 -0700
commitc11e3232963d28b4cdf73b694d82f7b6ed38894f (patch)
treeb6ae505db12eef6eb55f5fb3893b7e83398b71ad /xlators/mgmt/glusterd/src/glusterd-store.c
parentda9f8bd6e9421209243afeabbad350cc1d70fdc5 (diff)
snapshot: Fix snapshot clone postvalidate
BackPort Of http://review.gluster.org/#/c/12364/ In glusterd_snapshot_clone_postvalidate(), we were deleting snap object and snap vol, by looking up snapname. Hence, it was deleting the orignal snapshot from which the clone was being created Instead it should fetch the clonename, the respective clone vol, and its corresponding snap object, and delete them. Also glusterd_snap_remove(), needs to differentiate a clone snap object from a snaphsot snap object, as in case of a clone snap object, we don't have any persisted data in /var/run/gluster/snaps/ and hence is shouldn't try to delete anything there. Change-Id: I02bb22a3898d5720e318a02d6cc32d25f75d317d BUG: 1271627 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/12364 Tested-by: NetBSD Build System <jenkins@build.gluster.org> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: mohammed rafi kc <rkavunga@redhat.com> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> (cherry picked from commit 59401a32de51cdb6c1a5a1208723e89e1a4abd30) Reviewed-on: http://review.gluster.org/12406
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c
index 0b947287e97..28f3cf994ed 100644
--- a/xlators/mgmt/glusterd/src/glusterd-store.c
+++ b/xlators/mgmt/glusterd/src/glusterd-store.c
@@ -4200,7 +4200,8 @@ glusterd_snap_cleanup (xlator_t *this)
}
} else if (snap->snap_status != GD_SNAP_STATUS_IN_USE) {
ret = glusterd_snap_remove (dict, snap,
- _gf_true, _gf_true);
+ _gf_true, _gf_true,
+ _gf_false);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0,
GD_MSG_SNAP_REMOVE_FAIL,