From 65a84c9d0d691ac4f7a5f33374140e50746a96af Mon Sep 17 00:00:00 2001 From: Pranith K Date: Tue, 28 Sep 2010 02:47:08 +0000 Subject: mgmt/glusterd: prevent detach of peer with its bricks existing in cluster Signed-off-by: Pranith Kumar K Signed-off-by: Vijay Bellur BUG: 1681 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1681 --- xlators/mgmt/glusterd/src/glusterd-utils.h | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) (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 3f49acfda..9fa272a69 100644 --- a/xlators/mgmt/glusterd/src/glusterd-utils.h +++ b/xlators/mgmt/glusterd/src/glusterd-utils.h @@ -43,6 +43,10 @@ struct glusterd_lock_ { time_t timestamp; }; +typedef int (*glusterd_condition_func) (glusterd_volinfo_t *volinfo, + glusterd_brickinfo_t *brickinfo, + void *ctx); + typedef struct glusterd_lock_ glusterd_lock_t; int32_t @@ -173,4 +177,16 @@ glusterd_set_brick_status (glusterd_brickinfo_t *brickinfo, int glusterd_is_brick_started (glusterd_brickinfo_t *brickinfo); +int +glusterd_friend_find_by_hostname (const char *hoststr, + glusterd_peerinfo_t **peerinfo); +int +glusterd_hostname_to_uuid (char *hostname, uuid_t uuid); + +int +glusterd_friend_brick_belongs (glusterd_volinfo_t *volinfo, + glusterd_brickinfo_t *brickinfo, void *uuid); +int +glusterd_all_volume_cond_check (glusterd_condition_func func, int status, + void *ctx); #endif -- cgit