From: Martin Schwenke Date: Mon, 20 Jun 2016 10:47:17 +0000 (+1000) Subject: ctdb-ipalloc: Drop code to update IP assignment tree X-Git-Tag: tdb-1.3.10~547 X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=55f13b74bf4ee460b153d062acbdd758ce58ed1a;p=thirdparty%2Fsamba.git ctdb-ipalloc: Drop code to update IP assignment tree This code is not used. Signed-off-by: Martin Schwenke Reviewed-by: Amitay Isaacs --- diff --git a/ctdb/include/ctdb_private.h b/ctdb/include/ctdb_private.h index f4f5b675b63..57a045a9e9b 100644 --- a/ctdb/include/ctdb_private.h +++ b/ctdb/include/ctdb_private.h @@ -1015,10 +1015,6 @@ int32_t ctdb_control_del_public_address(struct ctdb_context *ctdb, struct ctdb_req_control_old *c, TDB_DATA recdata, bool *async_reply); -int update_ip_assignment_tree(struct ctdb_context *ctdb, - struct ctdb_public_ip *ip); -void clear_ip_assignment_tree(struct ctdb_context *ctdb); - int32_t ctdb_control_reload_public_ips(struct ctdb_context *ctdb, struct ctdb_req_control_old *c, bool *async_reply); diff --git a/ctdb/server/ctdb_takeover.c b/ctdb/server/ctdb_takeover.c index 9dfcc9ec4b6..0b18f4a5e93 100644 --- a/ctdb/server/ctdb_takeover.c +++ b/ctdb/server/ctdb_takeover.c @@ -3008,37 +3008,6 @@ int32_t ctdb_control_ipreallocated(struct ctdb_context *ctdb, } -int update_ip_assignment_tree(struct ctdb_context *ctdb, struct ctdb_public_ip *ip) -{ - struct public_ip_list *tmp_ip; - - /* IP tree is never built if DisableIPFailover is set */ - if (ctdb->tunable.disable_ip_failover != 0) { - return 0; - } - - if (ctdb->ip_tree == NULL) { - DEBUG(DEBUG_ERR,("No ctdb->ip_tree yet. Failed to update ip assignment\n")); - return -1; - } - - tmp_ip = trbt_lookuparray32(ctdb->ip_tree, IP_KEYLEN, ip_key(&ip->addr)); - if (tmp_ip == NULL) { - DEBUG(DEBUG_ERR,(__location__ " Could not find record for address %s, update ip\n", ctdb_addr_to_str(&ip->addr))); - return -1; - } - - DEBUG(DEBUG_NOTICE,("Updated ip assignment tree for ip : %s from node %u to node %u\n", ctdb_addr_to_str(&ip->addr), tmp_ip->pnn, ip->pnn)); - tmp_ip->pnn = ip->pnn; - - return 0; -} - -void clear_ip_assignment_tree(struct ctdb_context *ctdb) -{ - TALLOC_FREE(ctdb->ip_tree); -} - struct ctdb_reloadips_handle { struct ctdb_context *ctdb; struct ctdb_req_control_old *c;