summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-snapshot.c
diff options
context:
space:
mode:
authorAvra Sengupta <asengupt@redhat.com>2015-06-03 15:18:08 +0530
committerKrishnan Parthasarathi <kparthas@redhat.com>2015-06-05 02:22:00 -0700
commitbf3a6dcdf3c8a8a64e7c864b56c4d9be60fca8e6 (patch)
tree5db40559aca941e8de5793e3f3b181261116fce7 /xlators/mgmt/glusterd/src/glusterd-snapshot.c
parentd2d7afefd861943f26b290d214fb5213d24b6a02 (diff)
snapshot: Fix finding brick mount path logic
Previously while finding brick mount paths of snap volume's bricks, we were taking brick order into consideration. This logic fails when a brick is removed or a tier is added. Hence modifying the logic to look for the first occurence of the word "brick" in the brick path. From there we iterate till we find a '/'. The string till the first '/' after we encounter the word brick is the brick mount path. Change-Id: Ic85983c4e975e701cdfd4e13f8e276ac391a3e49 BUG: 1227646 Signed-off-by: Avra Sengupta <asengupt@redhat.com> Reviewed-on: http://review.gluster.org/11060 Tested-by: Gluster Build System <jenkins@build.gluster.com> Tested-by: NetBSD Build System <jenkins@build.gluster.org> Reviewed-by: Rajesh Joseph <rjoseph@redhat.com> Reviewed-by: Krishnan Parthasarathi <kparthas@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-snapshot.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-snapshot.c1
1 files changed, 0 insertions, 1 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-snapshot.c b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
index 7825031f706..c8911defd3b 100644
--- a/xlators/mgmt/glusterd/src/glusterd-snapshot.c
+++ b/xlators/mgmt/glusterd/src/glusterd-snapshot.c
@@ -2716,7 +2716,6 @@ glusterd_lvm_snapshot_remove (dict_t *rsp_dict, glusterd_volinfo_t *snap_vol)
/* Fetch the brick mount path from the brickinfo->path */
ret = glusterd_find_brick_mount_path (brickinfo->path,
- brick_count + 1,
&brick_mount_path);
if (ret) {
gf_msg (this->name, GF_LOG_ERROR, 0,