diff options
author | Martin Schwenke <martin@meltin.net> | 2016-06-22 14:23:38 +1000 |
---|---|---|
committer | Amitay Isaacs <amitay@samba.org> | 2016-07-04 15:42:25 +0200 |
commit | 445860bf84c5588406325d7601588c3a8b2ff3f2 (patch) | |
tree | 4bd49451403d4727b5d29eaf1f6cfdeca06b28af /ctdb | |
parent | 41a14e72b5944d8a92f91e4583c2826da497dc00 (diff) | |
download | samba-445860bf84c5588406325d7601588c3a8b2ff3f2.tar.gz |
ctdb-ipalloc: IP allocation state is now an opaque structure
It is private to the IP allocation module.
Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
Diffstat (limited to 'ctdb')
-rw-r--r-- | ctdb/server/ipalloc.h | 14 | ||||
-rw-r--r-- | ctdb/server/ipalloc_private.h | 14 |
2 files changed, 15 insertions, 13 deletions
diff --git a/ctdb/server/ipalloc.h b/ctdb/server/ipalloc.h index 13fdfed36eb..66a5e75eb6a 100644 --- a/ctdb/server/ipalloc.h +++ b/ctdb/server/ipalloc.h @@ -43,19 +43,7 @@ enum ipalloc_algorithm { IPALLOC_LCP2, }; -struct ipalloc_state { - uint32_t num; - - /* Arrays with data for each node */ - struct ctdb_public_ip_list *available_public_ips; - bool *noiptakeover; - bool *noiphost; - - struct public_ip_list *all_ips; - enum ipalloc_algorithm algorithm; - bool no_ip_failback; - uint32_t *force_rebalance_nodes; -}; +struct ipalloc_state; struct ipalloc_state * ipalloc_state_init(TALLOC_CTX *mem_ctx, uint32_t num_nodes, diff --git a/ctdb/server/ipalloc_private.h b/ctdb/server/ipalloc_private.h index 3ffdeba2409..232868738bf 100644 --- a/ctdb/server/ipalloc_private.h +++ b/ctdb/server/ipalloc_private.h @@ -26,6 +26,20 @@ #include "server/ipalloc.h" +struct ipalloc_state { + uint32_t num; + + /* Arrays with data for each node */ + struct ctdb_public_ip_list *available_public_ips; + bool *noiptakeover; + bool *noiphost; + + struct public_ip_list *all_ips; + enum ipalloc_algorithm algorithm; + bool no_ip_failback; + uint32_t *force_rebalance_nodes; +}; + bool can_node_takeover_ip(struct ipalloc_state *ipalloc_state, int32_t pnn, struct public_ip_list *ip); |