From bf3a6dcdf3c8a8a64e7c864b56c4d9be60fca8e6 Mon Sep 17 00:00:00 2001 From: Avra Sengupta Date: Wed, 3 Jun 2015 15:18:08 +0530 Subject: 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 Reviewed-on: http://review.gluster.org/11060 Tested-by: Gluster Build System Tested-by: NetBSD Build System Reviewed-by: Rajesh Joseph Reviewed-by: Krishnan Parthasarathi --- xlators/mgmt/glusterd/src/glusterd-utils.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h') diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 69f16a29edc..7741087ff74 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -577,8 +577,8 @@ int glusterd_unlink_file (char *sock_file_path); int32_t -glusterd_find_brick_mount_path (char *brick_path, int32_t brick_count, - char **brick_mount_path); +glusterd_find_brick_mount_path (char *brick_path, char **brick_mount_path); + /* * Function to retrieve list of snap volnames and their uuids */ -- cgit