From 7a80b6128ad91c1174a79b4fa6a0340dfd0b6d6b Mon Sep 17 00:00:00 2001 From: Mohit Agrawal Date: Tue, 13 Sep 2016 18:27:45 +0530 Subject: glusterd: "gluster v heal test statistics heal-count replica" output is not correct Problem : "gluster v heal test statistcs heal-count replica" does not show correct output. Solution: After update condition (match brick name) in _select_hxlator_with_matching_brick, it shows correct output. BUG: 1325792 Change-Id: I60cc7c68ea70bce267a747570f91dcddbc1d9016 Signed-off-by: Mohit Agrawal Reviewed-on: http://review.gluster.org/15494 NetBSD-regression: NetBSD Build System Smoke: Gluster Build System CentOS-regression: Gluster Build System Reviewed-by: Ravishankar N Reviewed-by: Atin Mukherjee --- xlators/mgmt/glusterd/src/glusterd-op-sm.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'xlators') diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c index 41a882a198d..502353f62b1 100644 --- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c +++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c @@ -6281,13 +6281,11 @@ _select_hxlator_with_matching_brick (xlator_t *this, glusterd_volinfo_t *volinfo, dict_t *dict, int *index) { - char *hostname = NULL; char *path = NULL; glusterd_brickinfo_t *brickinfo = NULL; int hxl_children = 0; if (!dict || - dict_get_str (dict, "per-replica-cmd-hostname", &hostname) || dict_get_str (dict, "per-replica-cmd-path", &path)) return -1; @@ -6299,7 +6297,8 @@ _select_hxlator_with_matching_brick (xlator_t *this, if (gf_uuid_is_null (brickinfo->uuid)) (void)glusterd_resolve_brick (brickinfo); - if (!gf_uuid_compare (MY_UUID, brickinfo->uuid)) { + if ((!gf_uuid_compare (MY_UUID, brickinfo->uuid)) && + (!strncmp (brickinfo->path, path, strlen(path)))) { _add_hxlator_to_dict (dict, volinfo, ((*index) - 1)/hxl_children, 0); return 1; -- cgit