summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-store.c
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2014-05-27 08:34:06 +0000
committerKrishnan Parthasarathi <kparthas@redhat.com>2014-06-10 23:42:52 -0700
commit020c9842770ede1d715780699671e7e2ac9587ae (patch)
treea1c8acde30aa299edda1987c8b9038bbc4cfe868 /xlators/mgmt/glusterd/src/glusterd-store.c
parent7445593036e411ef96b741448fab89284f91e7f8 (diff)
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 <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/7889 Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Vijaikumar Mallikarjuna <vmallika@redhat.com> Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com> Tested-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-store.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-store.c32
1 files changed, 2 insertions, 30 deletions
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