ctdb-ipalloc: IP allocation state is now an opaque structure
authorMartin Schwenke <martin@meltin.net>
Wed, 22 Jun 2016 04:23:38 +0000 (14:23 +1000)
committerAmitay Isaacs <amitay@samba.org>
Mon, 4 Jul 2016 13:42:25 +0000 (15:42 +0200)
It is private to the IP allocation module.

Signed-off-by: Martin Schwenke <martin@meltin.net>
Reviewed-by: Amitay Isaacs <amitay@gmail.com>
ctdb/server/ipalloc.h
ctdb/server/ipalloc_private.h

index 13fdfed..66a5e75 100644 (file)
@@ -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,
index 3ffdeba..2328687 100644 (file)
 
 #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);