diff options
author | Rajesh Amaravathi <rajesh.amaravathi@gmail.com> | 2011-09-19 16:43:50 +0530 |
---|---|---|
committer | Vijay Bellur <vijay@gluster.com> | 2011-09-19 04:39:10 -0700 |
commit | 8ad4d3f53000724389db6003ca6d6d777b880017 (patch) | |
tree | 32efa44f6bba22f47e2fb56d351fe4ab2e0734fc /xlators/mgmt/glusterd/src/glusterd-utils.h | |
parent | 608f2d698569abc82cc671e81477e89e9c553bda (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-utils.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.h | 12 |
1 files changed, 10 insertions, 2 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index f06a1ce1710..93fa763bd51 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -38,6 +38,12 @@ #include "rpc-clnt.h" #include "protocol-common.h" +/* For brick search using path: partial or complete */ +typedef enum { + GF_PATH_COMPLETE = 0, + GF_PATH_PARTIAL +} gf_path_match_t; + struct glusterd_lock_ { uuid_t owner; time_t timestamp; @@ -129,7 +135,8 @@ glusterd_is_cli_op_req (int32_t op); int32_t glusterd_volume_brickinfo_get_by_brick (char *brick, glusterd_volinfo_t *volinfo, - glusterd_brickinfo_t **brickinfo); + glusterd_brickinfo_t **brickinfo, + gf_path_match_t path_match); int32_t glusterd_is_local_addr (char *hostname); @@ -245,7 +252,8 @@ glusterd_volume_brickinfos_delete (glusterd_volinfo_t *volinfo); int32_t glusterd_volume_brickinfo_get (uuid_t uuid, char *hostname, char *path, glusterd_volinfo_t *volinfo, - glusterd_brickinfo_t **brickinfo); + glusterd_brickinfo_t **brickinfo, + gf_path_match_t path_match); int glusterd_brickinfo_get (uuid_t uuid, char *hostname, char *path, glusterd_brickinfo_t **brickinfo); |