summaryrefslogtreecommitdiffstats
path: root/xlators/mgmt/glusterd/src/glusterd-utils.h
diff options
context:
space:
mode:
authorPranith K <pranithk@gluster.com>2010-09-28 02:47:08 +0000
committerVijay Bellur <vijay@dev.gluster.com>2010-09-28 04:50:21 -0700
commit65a84c9d0d691ac4f7a5f33374140e50746a96af (patch)
tree3ae88729a1f8789d0df531331132180d3faed6c2 /xlators/mgmt/glusterd/src/glusterd-utils.h
parentdbbec1261eae8440726b001df8fe4c06837d6f3d (diff)
mgmt/glusterd: prevent detach of peer with its bricks existing in cluster
Signed-off-by: Pranith Kumar K <pranithk@gluster.com> Signed-off-by: Vijay Bellur <vijay@dev.gluster.com> BUG: 1681 () URL: http://bugs.gluster.com/cgi-bin/bugzilla3/show_bug.cgi?id=1681
Diffstat (limited to 'xlators/mgmt/glusterd/src/glusterd-utils.h')
-rw-r--r--xlators/mgmt/glusterd/src/glusterd-utils.h16
1 files changed, 16 insertions, 0 deletions
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