diff options
author | Avra Sengupta <asengupt@redhat.com> | 2015-10-15 16:08:03 +0530 |
---|---|---|
committer | Rajesh Joseph <rjoseph@redhat.com> | 2015-10-20 03:00:05 -0700 |
commit | 59401a32de51cdb6c1a5a1208723e89e1a4abd30 (patch) | |
tree | 06f1118ab5cdbbde7aadd6a53a33044b51f83303 /xlators/mgmt/glusterd/src/glusterd.h | |
parent | 7945121dda340ec8f25711b2ad3ca70b544de967 (diff) |
snapshot: Fix snapshot clone postvalidate
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: 1272339
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>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd.h | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd.h b/xlators/mgmt/glusterd/src/glusterd.h index e9098a227d2..7dbe96b6d83 100644 --- a/xlators/mgmt/glusterd/src/glusterd.h +++ b/xlators/mgmt/glusterd/src/glusterd.h @@ -1114,7 +1114,8 @@ glusterd_build_snap_device_path (char *device, char *snapname, int32_t glusterd_snap_remove (dict_t *rsp_dict, glusterd_snap_t *snap, - gf_boolean_t remove_lvm, gf_boolean_t force); + gf_boolean_t remove_lvm, gf_boolean_t force, + gf_boolean_t is_clone); int32_t glusterd_snapshot_cleanup (dict_t *dict, char **op_errstr, dict_t *rsp_dict); |