mirror of
https://github.com/samba-team/samba.git
synced 2025-01-11 05:18:09 +03:00
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>
This commit is contained in:
parent
41a14e72b5
commit
445860bf84
@ -43,19 +43,7 @@ enum ipalloc_algorithm {
|
|||||||
IPALLOC_LCP2,
|
IPALLOC_LCP2,
|
||||||
};
|
};
|
||||||
|
|
||||||
struct ipalloc_state {
|
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 * ipalloc_state_init(TALLOC_CTX *mem_ctx,
|
struct ipalloc_state * ipalloc_state_init(TALLOC_CTX *mem_ctx,
|
||||||
uint32_t num_nodes,
|
uint32_t num_nodes,
|
||||||
|
@ -26,6 +26,20 @@
|
|||||||
|
|
||||||
#include "server/ipalloc.h"
|
#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,
|
bool can_node_takeover_ip(struct ipalloc_state *ipalloc_state,
|
||||||
int32_t pnn,
|
int32_t pnn,
|
||||||
struct public_ip_list *ip);
|
struct public_ip_list *ip);
|
||||||
|
Loading…
Reference in New Issue
Block a user