diff options
| author | Mohammed Rafi KC <rkavunga@redhat.com> | 2015-03-17 19:57:47 +0530 |
|---|---|---|
| committer | Rajesh Joseph <rjoseph@redhat.com> | 2015-08-31 23:39:43 -0700 |
| commit | c00872cbff0ec2d7472d7c191e817f4e55f4ec9f (patch) | |
| tree | 5832bff5c944770d74a50e49d4cea568f3b45cb5 /xlators/mgmt/glusterd/src/glusterd-snapshot.c | |
| parent | b60f931e8e2479d9a93e568b358feb24f52a864b (diff) | |
snapshot:cleanup snaps during unprobe
Backport of http://review.gluster.org/#/c/9930/
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: 1255384
Signed-off-by: Mohammed Rafi KC <rkavunga@redhat.com>
Reviewed-on: http://review.gluster.org/11970
Tested-by: NetBSD Build System <jenkins@build.gluster.org>
Reviewed-by: Rajesh Joseph <rjoseph@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c')
| -rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-snapshot.c | 23 |
1 files changed, 1 insertions, 22 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c index e9db37f8738..f9a01f31e63 100644 --- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c +++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c @@ -86,6 +86,7 @@ typedef struct snap_create_args_ snap_create_args_t; then the snap device will be /dev/<group-name>/<snapname>. 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) @@ -2961,28 +2962,6 @@ out: } 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, gf_boolean_t remove_lvm, |
