diff options
author | Krishnan Parthasarathi <kparthas@redhat.com> | 2012-07-12 17:35:37 +0530 |
---|---|---|
committer | Anand Avati <avati@redhat.com> | 2012-07-19 09:09:33 -0700 |
commit | 9f5b8911b484230304fa52c0fcd92f696a4af74a (patch) | |
tree | 39c349e2bec47d1078d8452d84125f16928cdff4 /xlators/mgmt/glusterd/src/glusterd-utils.h | |
parent | c0b07bdf5d253cf5620726f149700960e962b8ec (diff) |
glusterd: Refactored brickinfo APIs
This patch modifies the existing brickinfo function signatures
and/or names to do one thing right and call them by 'appropriate' names.
- Decoupled brickinfo_get and is_brickpath_available
- Removed dead comment about realpath(3) in canonicalize_path
- Renamed glusterd_brickinfo_from_brick to glusterd_brickinfo_new_from_brick
to make the name of the function reflect that an allocation is happening
Change-Id: I29daba6d431ca799d43c927b9dfbaeda327e83e8
BUG: 764890
Signed-off-by: Krishnan Parthasarathi <kparthas@redhat.com>
Reviewed-on: http://review.gluster.com/3668
Tested-by: Gluster Build System <jenkins@build.gluster.com>
Reviewed-by: Amar Tumballi <amarts@redhat.com>
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h')
-rw-r--r-- | xlators/mgmt/glusterd/src/glusterd-utils.h | 16 |
1 files changed, 5 insertions, 11 deletions
diff --git a/xlators/mgmt/glusterd/src/glusterd-utils.h b/xlators/mgmt/glusterd/src/glusterd-utils.h index 0990ae524..c538345fd 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -38,12 +38,6 @@ #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; @@ -112,7 +106,7 @@ int32_t glusterd_brickinfo_new (glusterd_brickinfo_t **brickinfo); int32_t -glusterd_brickinfo_from_brick (char *brick, glusterd_brickinfo_t **brickinfo); +glusterd_brickinfo_new_from_brick (char *brick, glusterd_brickinfo_t **brickinfo); int32_t glusterd_friend_cleanup (glusterd_peerinfo_t *peerinfo); @@ -153,8 +147,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, - gf_path_match_t path_match); + glusterd_brickinfo_t **brickinfo); + int32_t glusterd_is_local_addr (char *hostname); @@ -299,8 +293,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, - gf_path_match_t path_match); + glusterd_brickinfo_t **brickinfo); + int glusterd_brickinfo_get (uuid_t uuid, char *hostname, char *path, glusterd_brickinfo_t **brickinfo); |