summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-op-sm.c
diff options
context:
space:
mode:
authorRajesh Amaravathi <rajesh.amaravathi@gmail.com>2011-09-19 16:43:50 +0530
committerVijay Bellur <vijay@gluster.com>2011-09-19 04:39:10 -0700
commit8ad4d3f53000724389db6003ca6d6d777b880017 (patch)
tree32efa44f6bba22f47e2fb56d351fe4ab2e0734fc /xlators/mgmt/glusterd/src/glusterd-op-sm.c
parent608f2d698569abc82cc671e81477e89e9c553bda (diff)
glusterd/top: volume top succeeds on partial brickpath
Rewrite of glusterd_volume_brickinfo_get in glusterd-utils.c An additional argument to glusterd_volume_brick_info_get_by_brick and glusterd_volume_brickinfo_get enables matching brick path in two ways: Complete or partial(ancestor and descendent paths matched). Change-Id: Ia87833a6f0c139599c3e40b59d60c64281b4084b BUG: 3271 Reviewed-on: http://review.gluster.com/162 Tested-by: Gluster Build System <jenkins@build.gluster.com> Reviewed-by: Shishir Gowda <shishirng@gluster.com> Reviewed-by: Vijay Bellur <vijay@gluster.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-op-sm.c')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-op-sm.c8
1 files changed, 5 insertions, 3 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-op-sm.c b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
index 14c9566acd5..2b2a1e766df 100644
--- a/xlators/mgmt/glusterd/src/glusterd-op-sm.c
+++ b/xlators/mgmt/glusterd/src/glusterd-op-sm.c
@@ -2566,7 +2566,8 @@ glusterd_bricks_select_remove_brick (dict_t *dict, char **op_errstr)
}
ret = glusterd_volume_brickinfo_get_by_brick (brick, volinfo,
- &brickinfo);
+ &brickinfo,
+ GF_PATH_COMPLETE);
if (ret)
goto out;
if (glusterd_is_brick_started (brickinfo)) {
@@ -2655,8 +2656,9 @@ glusterd_bricks_select_profile_volume (dict_t *dict, char **op_errstr)
case GF_CLI_STATS_TOP:
ret = dict_get_str (dict, "brick", &brick);
if (!ret) {
- ret = glusterd_volume_brickinfo_get_by_brick (brick,
- volinfo, &brickinfo);
+ ret = glusterd_volume_brickinfo_get_by_brick (brick, volinfo,
+ &brickinfo,
+ GF_PATH_COMPLETE);
if (ret)
goto out;