From 020c9842770ede1d715780699671e7e2ac9587ae Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Tue, 27 May 2014 08:34:06 +0000 Subject: glusterd/snapshot: Remove mnt pt, while removing lvm During a delete/restore snapshot remove the mnt point dir created at /var/run/gluster/snaps along with the lvm mounted on it. Also removed glusterd_recreate_vol_brick_mounts and renamed glusterd_store_recreate_brick_mounts as glusterd_recreate_vol_brick_mounts, inorder to reduce redundant multiple calls Change-Id: Ie87907ebbf8ef790fba07ef8581d2eb8d55658d0 BUG: 1101463 Signed-off-by: Avra Sengupta Reviewed-on: http://review.gluster.org/7889 Reviewed-by: Rajesh Joseph Reviewed-by: Vijaikumar Mallikarjuna Tested-by: Gluster Build System Reviewed-by: Krishnan Parthasarathi Tested-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-store.c | 32 ++---------------------------- 1 file changed, 2 insertions(+), 30 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c') diff --git a/xlators/mgmt/glusterd/src/glusterd-store.c b/xlators/mgmt/glusterd/src/glusterd-store.c index 790bf9644f6..7efa9fb6d17 100644 --- a/xlators/mgmt/glusterd/src/glusterd-store.c +++ b/xlators/mgmt/glusterd/src/glusterd-store.c @@ -3034,16 +3034,15 @@ out: } static int32_t -glusterd_store_recreate_brick_mounts (glusterd_volinfo_t *volinfo) +glusterd_recreate_vol_brick_mounts (xlator_t *this, + glusterd_volinfo_t *volinfo) { char *brick_mount_path = NULL; glusterd_brickinfo_t *brickinfo = NULL; int32_t ret = -1; int32_t brick_count = -1; struct stat st_buf = {0, }; - xlator_t *this = NULL; - this = THIS; GF_ASSERT (this); GF_ASSERT (volinfo); @@ -3896,33 +3895,6 @@ out: return ret; } -static int32_t -glusterd_recreate_vol_brick_mounts (xlator_t *this, - glusterd_volinfo_t *volinfo) -{ - int32_t ret = 0; - glusterd_conf_t *priv = NULL; - glusterd_brickinfo_t *brickinfo = NULL; - - GF_ASSERT (this); - priv = this->private; - GF_ASSERT (priv); - - list_for_each_entry (brickinfo, &volinfo->bricks, brick_list) { - ret = glusterd_store_recreate_brick_mounts (volinfo); - if (ret) { - gf_log (this->name, GF_LOG_ERROR, - "Failed to recreate brick mounts " - "for %s", volinfo->volname); - goto out; - } - } - -out: - gf_log (this->name, GF_LOG_TRACE, "Returning with %d", ret); - return ret; -} - /* Bricks for snap volumes are hosted at /var/run/gluster/snaps * When a volume is restored, it points to the bricks of the snap * volume it was restored from. Hence on a node restart these -- cgit