From e883e98998404a9e1ef18516d88520cfe2451b3f Mon Sep 17 00:00:00 2001 From: Mohammed Rafi KC Date: Tue, 17 Mar 2015 19:57:47 +0530 Subject: snapshot:cleanup snaps during unprobe When doing an unprobe, the volume that doesnot contain any brick of the particular node will be deleted. So the snaps associated with that volume should also delete Change-Id: I9f3d23bd11b254ebf7d7722cc1e12455d6b024ff BUG: 1203185 Signed-off-by: Mohammed Rafi KC Reviewed-on: http://review.gluster.org/9930 Tested-by: NetBSD Build System Reviewed-by: Avra Sengupta Reviewed-by: Rajesh Joseph --- xlators/mgmt/glusterd/src/glusterd-snapshot.c | 23 +---------------------- 1 file changed, 1 insertion(+), 22 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index b18c4699b68..131f7dbbe16 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -81,6 +81,7 @@ typedef struct snap_create_args_ snap_create_args_t; then the snap device will be /dev//. This function takes care of building the path for the snap device. */ + char * glusterd_build_snap_device_path (char *device, char *snapname, int32_t brickcount) @@ -2955,28 +2956,6 @@ out: return ret; } -int32_t -glusterd_snapobject_delete (glusterd_snap_t *snap) -{ - if (snap == NULL) { - gf_msg(THIS->name, GF_LOG_WARNING, EINVAL, - GD_MSG_INVALID_ENTRY, "snap is NULL"); - return -1; - } - - cds_list_del_init (&snap->snap_list); - cds_list_del_init (&snap->volumes); - if (LOCK_DESTROY(&snap->lock)) - gf_msg (THIS->name, GF_LOG_WARNING, 0, - GD_MSG_LOCK_DESTROY_FAILED, "Failed destroying lock" - "of snap %s", snap->snapname); - - GF_FREE (snap->description); - GF_FREE (snap); - - return 0; -} - int32_t glusterd_snap_remove (dict_t *rsp_dict, glusterd_snap_t *snap, -- cgit