ctdb-daemon: Rename struct ctdb_node_map to ctdb_node_map_old
authorAmitay Isaacs <amitay@gmail.com>
Thu, 29 Oct 2015 06:22:48 +0000 (17:22 +1100)
committerMartin Schwenke <martins@samba.org>
Tue, 3 Nov 2015 23:47:14 +0000 (00:47 +0100)
Signed-off-by: Amitay Isaacs <amitay@gmail.com>
Reviewed-by: Martin Schwenke <martin@meltin.net>
16 files changed:
ctdb/client/ctdb_client.c
ctdb/common/common.h
ctdb/common/ctdb_util.c
ctdb/include/ctdb_client.h
ctdb/include/ctdb_private.h
ctdb/include/ctdb_protocol.h
ctdb/server/ctdb_daemon.c
ctdb/server/ctdb_recoverd.c
ctdb/server/ctdb_server.c
ctdb/server/ctdb_takeover.c
ctdb/server/ctdb_vacuum.c
ctdb/tests/src/ctdb_takeover_tests.c
ctdb/tests/src/ctdb_test.c
ctdb/tests/src/ctdb_test_stubs.c
ctdb/tools/ctdb.c
source3/lib/ctdbd_conn.c

index 14cc5a5523f6729b458e2defc250046425bac86b..68392c8b6d3e1a2c5c3e9db5d7ee29749f2d6962 100644 (file)
@@ -1558,7 +1558,7 @@ int ctdb_ctrl_getdbmap(struct ctdb_context *ctdb, struct timeval timeout, uint32
  */
 int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb, 
                struct timeval timeout, uint32_t destnode, 
-               TALLOC_CTX *mem_ctx, struct ctdb_node_map **nodemap)
+               TALLOC_CTX *mem_ctx, struct ctdb_node_map_old **nodemap)
 {
        int ret;
        TDB_DATA outdata;
@@ -1572,7 +1572,7 @@ int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb,
                return -1;
        }
 
-       *nodemap = (struct ctdb_node_map *)talloc_memdup(mem_ctx, outdata.dptr, outdata.dsize);
+       *nodemap = (struct ctdb_node_map_old *)talloc_memdup(mem_ctx, outdata.dptr, outdata.dsize);
        talloc_free(outdata.dptr);
        return 0;
 }
@@ -1582,7 +1582,7 @@ int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb,
  */
 int ctdb_ctrl_getnodesfile(struct ctdb_context *ctdb,
                           struct timeval timeout, uint32_t destnode,
-                          TALLOC_CTX *mem_ctx, struct ctdb_node_map **nodemap)
+                          TALLOC_CTX *mem_ctx, struct ctdb_node_map_old **nodemap)
 {
        int ret;
        TDB_DATA outdata;
@@ -1596,7 +1596,7 @@ int ctdb_ctrl_getnodesfile(struct ctdb_context *ctdb,
                return -1;
        }
 
-       *nodemap = (struct ctdb_node_map *)talloc_memdup(mem_ctx, outdata.dptr, outdata.dsize);
+       *nodemap = (struct ctdb_node_map_old *)talloc_memdup(mem_ctx, outdata.dptr, outdata.dsize);
        talloc_free(outdata.dptr);
 
        return 0;
@@ -2020,7 +2020,7 @@ uint32_t *ctdb_get_connected_nodes(struct ctdb_context *ctdb,
                                TALLOC_CTX *mem_ctx,
                                uint32_t *num_nodes)
 {
-       struct ctdb_node_map *map=NULL;
+       struct ctdb_node_map_old *map=NULL;
        int ret, i;
        uint32_t *nodes;
 
@@ -2970,7 +2970,7 @@ int ctdb_ctrl_modflags(struct ctdb_context *ctdb, struct timeval timeout, uint32
 {
        int ret;
        TDB_DATA data;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        struct ctdb_node_flag_change c;
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
        uint32_t recmaster;
@@ -3622,7 +3622,7 @@ uint32_t *list_of_vnnmap_nodes(struct ctdb_context *ctdb,
  * If exclude_pnn is not -1 then exclude that pnn from the list.
  */
 uint32_t *list_of_nodes(struct ctdb_context *ctdb,
-                       struct ctdb_node_map *node_map,
+                       struct ctdb_node_map_old *node_map,
                        TALLOC_CTX *mem_ctx,
                        uint32_t mask,
                        int exclude_pnn)
@@ -3657,7 +3657,7 @@ uint32_t *list_of_nodes(struct ctdb_context *ctdb,
 }
 
 uint32_t *list_of_active_nodes(struct ctdb_context *ctdb,
-                               struct ctdb_node_map *node_map,
+                               struct ctdb_node_map_old *node_map,
                                TALLOC_CTX *mem_ctx,
                                bool include_self)
 {
@@ -3666,7 +3666,7 @@ uint32_t *list_of_active_nodes(struct ctdb_context *ctdb,
 }
 
 uint32_t *list_of_connected_nodes(struct ctdb_context *ctdb,
-                               struct ctdb_node_map *node_map,
+                               struct ctdb_node_map_old *node_map,
                                TALLOC_CTX *mem_ctx,
                                bool include_self)
 {
@@ -3777,7 +3777,7 @@ struct ctdb_node_capabilities *
 ctdb_get_capabilities(struct ctdb_context *ctdb,
                      TALLOC_CTX *mem_ctx,
                      struct timeval timeout,
-                     struct ctdb_node_map *nodemap)
+                     struct ctdb_node_map_old *nodemap)
 {
        uint32_t *nodes;
        uint32_t i, res;
index 49c5faf8a10ad84652f226a4dd618db1302ca2cd..ebf119eda022d10c4bd8bea60e8af4e153cae4d0 100644 (file)
@@ -138,12 +138,12 @@ char *ctdb_addr_to_str(ctdb_sock_addr *addr);
 
 unsigned ctdb_addr_to_port(ctdb_sock_addr *addr);
 
-struct ctdb_node_map *ctdb_read_nodes_file(TALLOC_CTX *mem_ctx,
-                                          const char *nlist);
+struct ctdb_node_map_old *ctdb_read_nodes_file(TALLOC_CTX *mem_ctx,
+                                              const char *nlist);
 
-struct ctdb_node_map *ctdb_node_list_to_map(struct ctdb_node **nodes,
-                                           uint32_t num_nodes,
-                                           TALLOC_CTX *mem_ctx);
+struct ctdb_node_map_old *ctdb_node_list_to_map(struct ctdb_node **nodes,
+                                               uint32_t num_nodes,
+                                               TALLOC_CTX *mem_ctx);
 
 const char *runstate_to_string(enum ctdb_runstate runstate);
 
index 90907081bdda1a9595be68f6c6238e7a043f4fa3..4e700eb4b3af3e838e79c1cb6fea3c641e052e89 100644 (file)
@@ -453,7 +453,7 @@ unsigned ctdb_addr_to_port(ctdb_sock_addr *addr)
 /* Add a node to a node map with given address and flags */
 static bool node_map_add(TALLOC_CTX *mem_ctx,
                         const char *nstr, uint32_t flags,
-                        struct ctdb_node_map **node_map)
+                        struct ctdb_node_map_old **node_map)
 {
        ctdb_sock_addr addr;
        uint32_t num;
@@ -466,7 +466,7 @@ static bool node_map_add(TALLOC_CTX *mem_ctx,
        }
 
        num = (*node_map)->num + 1;
-       s = offsetof(struct ctdb_node_map, nodes) +
+       s = offsetof(struct ctdb_node_map_old, nodes) +
                num * sizeof(struct ctdb_node_and_flags);
        *node_map = talloc_realloc_size(mem_ctx, *node_map, s);
        if (*node_map == NULL) {
@@ -485,16 +485,16 @@ static bool node_map_add(TALLOC_CTX *mem_ctx,
 }
 
 /* Read a nodes file into a node map */
-struct ctdb_node_map *ctdb_read_nodes_file(TALLOC_CTX *mem_ctx,
+struct ctdb_node_map_old *ctdb_read_nodes_file(TALLOC_CTX *mem_ctx,
                                           const char *nlist)
 {
        char **lines;
        int nlines;
        int i;
-       struct ctdb_node_map *ret;
+       struct ctdb_node_map_old *ret;
 
        /* Allocate node map header */
-       ret = talloc_zero_size(mem_ctx, offsetof(struct ctdb_node_map, nodes));
+       ret = talloc_zero_size(mem_ctx, offsetof(struct ctdb_node_map_old, nodes));
        if (ret == NULL) {
                DEBUG(DEBUG_ERR, (__location__ " Out of memory\n"));
                return false;
@@ -554,17 +554,17 @@ struct ctdb_node_map *ctdb_read_nodes_file(TALLOC_CTX *mem_ctx,
        return ret;
 }
 
-struct ctdb_node_map *
+struct ctdb_node_map_old *
 ctdb_node_list_to_map(struct ctdb_node **nodes, uint32_t num_nodes,
                      TALLOC_CTX *mem_ctx)
 {
        uint32_t i;
        size_t size;
-       struct ctdb_node_map *node_map;
+       struct ctdb_node_map_old *node_map;
 
-       size = offsetof(struct ctdb_node_map, nodes) +
+       size = offsetof(struct ctdb_node_map_old, nodes) +
                num_nodes * sizeof(struct ctdb_node_and_flags);
-       node_map  = (struct ctdb_node_map *)talloc_zero_size(mem_ctx, size);
+       node_map  = (struct ctdb_node_map_old *)talloc_zero_size(mem_ctx, size);
        if (node_map == NULL) {
                DEBUG(DEBUG_ERR,
                      (__location__ " Failed to allocate nodemap array\n"));
index 77347eaafc894185061ffde236299dde267dea22..aa28a20d863738ff56f1cbe08975afca189966f8 100644 (file)
@@ -207,11 +207,11 @@ int ctdb_ctrl_getdbmap(struct ctdb_context *ctdb, struct timeval timeout,
 
 int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb, struct timeval timeout,
                         uint32_t destnode, TALLOC_CTX *mem_ctx,
-                        struct ctdb_node_map **nodemap);
+                        struct ctdb_node_map_old **nodemap);
 
 int ctdb_ctrl_getnodesfile(struct ctdb_context *ctdb, struct timeval timeout,
                           uint32_t destnode, TALLOC_CTX *mem_ctx,
-                          struct ctdb_node_map **nodemap);
+                          struct ctdb_node_map_old **nodemap);
 
 int ctdb_ctrl_reload_nodes_file(struct ctdb_context *ctdb,
                                struct timeval timeout, uint32_t destnode);
@@ -498,13 +498,13 @@ uint32_t *list_of_vnnmap_nodes(struct ctdb_context *ctdb,
                               TALLOC_CTX *mem_ctx, bool include_self);
 
 uint32_t *list_of_nodes(struct ctdb_context *ctdb,
-                       struct ctdb_node_map *node_map,
+                       struct ctdb_node_map_old *node_map,
                        TALLOC_CTX *mem_ctx, uint32_t mask, int exclude_pnn);
 uint32_t *list_of_active_nodes(struct ctdb_context *ctdb,
-                              struct ctdb_node_map *node_map,
+                              struct ctdb_node_map_old *node_map,
                               TALLOC_CTX *mem_ctx, bool include_self);
 uint32_t *list_of_connected_nodes(struct ctdb_context *ctdb,
-                                 struct ctdb_node_map *node_map,
+                                 struct ctdb_node_map_old *node_map,
                                  TALLOC_CTX *mem_ctx, bool include_self);
 
 int ctdb_read_pnn_lock(int fd, int32_t pnn);
@@ -537,7 +537,7 @@ struct ctdb_node_capabilities *ctdb_get_capabilities(
                                        struct ctdb_context *ctdb,
                                        TALLOC_CTX *mem_ctx,
                                        struct timeval timeout,
-                                       struct ctdb_node_map *nodemap);
+                                       struct ctdb_node_map_old *nodemap);
 
 /* Get capabilities for specified node, NULL if not found */
 uint32_t *ctdb_get_node_capabilities(struct ctdb_node_capabilities *caps,
index 4c72a513301cdf2b97728ff884808e15c14ffb46..09279198782a303273145ed373ac1d1c604b307e 100644 (file)
@@ -961,7 +961,7 @@ int ctdb_set_public_addresses(struct ctdb_context *ctdb, bool check_addresses);
 int ctdb_set_single_public_ip(struct ctdb_context *ctdb, const char *iface,
                              const char *ip);
 
-int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap,
+int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map_old *nodemap,
                      uint32_t *force_rebalance_nodes,
                      client_async_callback fail_callback, void *callback_data);
 
index 6286a089f668bc8700123e1d55307f2ee2ef8678..d1e13a41fdc4c6aba9ef47fe6d61a432c086be6f 100644 (file)
@@ -553,7 +553,7 @@ struct ctdb_node_and_flags {
    The nodemap is the structure containing a list of all nodes
    known to the cluster and their associated flags.
 */
-struct ctdb_node_map {
+struct ctdb_node_map_old {
        uint32_t num;
        struct ctdb_node_and_flags nodes[1];
 };
index f80289f48756dd05c28dce1ff9689e1f18e23c3b..a7439c34dd997ed466425142da226e316b2a5946 100644 (file)
@@ -1789,7 +1789,7 @@ int32_t ctdb_control_process_exists(struct ctdb_context *ctdb, pid_t pid)
 
 int ctdb_control_getnodesfile(struct ctdb_context *ctdb, uint32_t opcode, TDB_DATA indata, TDB_DATA *outdata)
 {
-       struct ctdb_node_map *node_map = NULL;
+       struct ctdb_node_map_old *node_map = NULL;
 
        CHECK_CONTROL_DATA_SIZE(0);
 
index 1db768120e8170cc69c1078025b98d1ed20476ba..61006bf0396945d6e17f0e091000d61c770b963a 100644 (file)
@@ -238,7 +238,7 @@ struct ctdb_recoverd {
        struct ctdb_context *ctdb;
        uint32_t recmaster;
        uint32_t last_culprit_node;
-       struct ctdb_node_map *nodemap;
+       struct ctdb_node_map_old *nodemap;
        struct timeval priority_time;
        bool need_takeover_run;
        bool need_recovery;
@@ -352,7 +352,7 @@ static void recovered_fail_callback(struct ctdb_context *ctdb, uint32_t node_pnn
 /*
   run the "recovered" eventscript on all nodes
  */
-static int run_recovered_eventscript(struct ctdb_recoverd *rec, struct ctdb_node_map *nodemap, const char *caller)
+static int run_recovered_eventscript(struct ctdb_recoverd *rec, struct ctdb_node_map_old *nodemap, const char *caller)
 {
        TALLOC_CTX *tmp_ctx;
        uint32_t *nodes;
@@ -392,7 +392,7 @@ static void startrecovery_fail_callback(struct ctdb_context *ctdb, uint32_t node
 /*
   run the "startrecovery" eventscript on all nodes
  */
-static int run_startrecovery_eventscript(struct ctdb_recoverd *rec, struct ctdb_node_map *nodemap)
+static int run_startrecovery_eventscript(struct ctdb_recoverd *rec, struct ctdb_node_map_old *nodemap)
 {
        TALLOC_CTX *tmp_ctx;
        uint32_t *nodes;
@@ -421,7 +421,7 @@ static int run_startrecovery_eventscript(struct ctdb_recoverd *rec, struct ctdb_
   update the node capabilities for all connected nodes
  */
 static int update_capabilities(struct ctdb_recoverd *rec,
-                              struct ctdb_node_map *nodemap)
+                              struct ctdb_node_map_old *nodemap)
 {
        uint32_t *capp;
        TALLOC_CTX *tmp_ctx;
@@ -479,7 +479,7 @@ static void transaction_start_fail_callback(struct ctdb_context *ctdb, uint32_t
  */
 static int set_recovery_mode(struct ctdb_context *ctdb,
                             struct ctdb_recoverd *rec,
-                            struct ctdb_node_map *nodemap,
+                            struct ctdb_node_map_old *nodemap,
                             uint32_t rec_mode, bool freeze)
 {
        TDB_DATA data;
@@ -531,7 +531,7 @@ static int set_recovery_mode(struct ctdb_context *ctdb,
 /*
   change recovery master on all node
  */
-static int set_recovery_master(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap, uint32_t pnn)
+static int set_recovery_master(struct ctdb_context *ctdb, struct ctdb_node_map_old *nodemap, uint32_t pnn)
 {
        TDB_DATA data;
        TALLOC_CTX *tmp_ctx;
@@ -564,7 +564,7 @@ static int set_recovery_master(struct ctdb_context *ctdb, struct ctdb_node_map *
    a recovery if this call fails.
 */
 static int update_db_priority_on_remote_nodes(struct ctdb_context *ctdb,
-       struct ctdb_node_map *nodemap, 
+       struct ctdb_node_map_old *nodemap, 
        uint32_t pnn, struct ctdb_dbid_map *dbmap, TALLOC_CTX *mem_ctx)
 {
        int db;
@@ -597,7 +597,7 @@ static int update_db_priority_on_remote_nodes(struct ctdb_context *ctdb,
 /*
   ensure all other nodes have attached to any databases that we have
  */
-static int create_missing_remote_databases(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap, 
+static int create_missing_remote_databases(struct ctdb_context *ctdb, struct ctdb_node_map_old *nodemap, 
                                           uint32_t pnn, struct ctdb_dbid_map *dbmap, TALLOC_CTX *mem_ctx)
 {
        int i, j, db, ret;
@@ -661,7 +661,7 @@ static int create_missing_remote_databases(struct ctdb_context *ctdb, struct ctd
 /*
   ensure we are attached to any databases that anyone else is attached to
  */
-static int create_missing_local_databases(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap, 
+static int create_missing_local_databases(struct ctdb_context *ctdb, struct ctdb_node_map_old *nodemap, 
                                          uint32_t pnn, struct ctdb_dbid_map **dbmap, TALLOC_CTX *mem_ctx)
 {
        int i, j, db, ret;
@@ -858,7 +858,7 @@ static void pull_seqnum_fail_cb(struct ctdb_context *ctdb, uint32_t node_pnn, in
 
 static int pull_highest_seqnum_pdb(struct ctdb_context *ctdb,
                                struct ctdb_recoverd *rec, 
-                               struct ctdb_node_map *nodemap, 
+                               struct ctdb_node_map_old *nodemap, 
                                struct tdb_wrap *recdb, uint32_t dbid)
 {
        TALLOC_CTX *tmp_ctx = talloc_new(NULL);
@@ -929,7 +929,7 @@ static int pull_highest_seqnum_pdb(struct ctdb_context *ctdb,
  */
 static int pull_remote_database(struct ctdb_context *ctdb,
                                struct ctdb_recoverd *rec, 
-                               struct ctdb_node_map *nodemap, 
+                               struct ctdb_node_map_old *nodemap, 
                                struct tdb_wrap *recdb, uint32_t dbid,
                                bool persistent)
 {
@@ -966,7 +966,7 @@ static int pull_remote_database(struct ctdb_context *ctdb,
 /*
   update flags on all active nodes
  */
-static int update_flags_on_all_nodes(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap, uint32_t pnn, uint32_t flags)
+static int update_flags_on_all_nodes(struct ctdb_context *ctdb, struct ctdb_node_map_old *nodemap, uint32_t pnn, uint32_t flags)
 {
        int ret;
 
@@ -982,7 +982,7 @@ static int update_flags_on_all_nodes(struct ctdb_context *ctdb, struct ctdb_node
 /*
   ensure all nodes have the same vnnmap we do
  */
-static int update_vnnmap_on_all_nodes(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap, 
+static int update_vnnmap_on_all_nodes(struct ctdb_context *ctdb, struct ctdb_node_map_old *nodemap, 
                                      uint32_t pnn, struct ctdb_vnn_map *vnnmap, TALLOC_CTX *mem_ctx)
 {
        int j, ret;
@@ -1236,7 +1236,7 @@ static void ctdb_wait_election(struct ctdb_recoverd *rec)
   Update our local flags from all remote connected nodes. 
   This is only run when we are or we belive we are the recovery master
  */
-static int update_local_flags(struct ctdb_recoverd *rec, struct ctdb_node_map *nodemap)
+static int update_local_flags(struct ctdb_recoverd *rec, struct ctdb_node_map_old *nodemap)
 {
        int j;
        struct ctdb_context *ctdb = rec->ctdb;
@@ -1246,7 +1246,7 @@ static int update_local_flags(struct ctdb_recoverd *rec, struct ctdb_node_map *n
           they are the same as for this node
         */
        for (j=0; j<nodemap->num; j++) {
-               struct ctdb_node_map *remote_nodemap=NULL;
+               struct ctdb_node_map_old *remote_nodemap=NULL;
                int ret;
 
                if (nodemap->nodes[j].flags & NODE_FLAGS_DISCONNECTED) {
@@ -1436,7 +1436,7 @@ static int traverse_recdb(struct tdb_context *tdb, TDB_DATA key, TDB_DATA data,
  */
 static int push_recdb_database(struct ctdb_context *ctdb, uint32_t dbid,
                               bool persistent,
-                              struct tdb_wrap *recdb, struct ctdb_node_map *nodemap)
+                              struct tdb_wrap *recdb, struct ctdb_node_map_old *nodemap)
 {
        struct recdb_data params;
        struct ctdb_marshall_buffer *recdata;
@@ -1508,7 +1508,7 @@ static int recover_database(struct ctdb_recoverd *rec,
                            uint32_t dbid,
                            bool persistent,
                            uint32_t pnn, 
-                           struct ctdb_node_map *nodemap,
+                           struct ctdb_node_map_old *nodemap,
                            uint32_t transaction_id)
 {
        struct tdb_wrap *recdb;
@@ -1566,7 +1566,7 @@ static int recover_database(struct ctdb_recoverd *rec,
 
 static int ctdb_reload_remote_public_ips(struct ctdb_context *ctdb,
                                         struct ctdb_recoverd *rec,
-                                        struct ctdb_node_map *nodemap,
+                                        struct ctdb_node_map_old *nodemap,
                                         uint32_t *culprit)
 {
        int j;
@@ -1729,7 +1729,7 @@ static void ban_misbehaving_nodes(struct ctdb_recoverd *rec, bool *self_ban)
 }
 
 static bool do_takeover_run(struct ctdb_recoverd *rec,
-                           struct ctdb_node_map *nodemap,
+                           struct ctdb_node_map_old *nodemap,
                            bool banning_credits_on_fail)
 {
        uint32_t *nodes = NULL;
@@ -1940,7 +1940,7 @@ fail:
 }
 
 static int db_recovery_serial(struct ctdb_recoverd *rec, TALLOC_CTX *mem_ctx,
-                             uint32_t pnn, struct ctdb_node_map *nodemap,
+                             uint32_t pnn, struct ctdb_node_map_old *nodemap,
                              struct ctdb_vnn_map *vnnmap,
                              struct ctdb_dbid_map *dbmap)
 {
@@ -2108,7 +2108,7 @@ static int db_recovery_serial(struct ctdb_recoverd *rec, TALLOC_CTX *mem_ctx,
  */
 static int do_recovery(struct ctdb_recoverd *rec,
                       TALLOC_CTX *mem_ctx, uint32_t pnn,
-                      struct ctdb_node_map *nodemap, struct ctdb_vnn_map *vnnmap)
+                      struct ctdb_node_map_old *nodemap, struct ctdb_vnn_map *vnnmap)
 {
        struct ctdb_context *ctdb = rec->ctdb;
        int i, ret;
@@ -2368,7 +2368,7 @@ struct election_message {
 static void ctdb_election_data(struct ctdb_recoverd *rec, struct election_message *em)
 {
        int ret, i;
-       struct ctdb_node_map *nodemap;
+       struct ctdb_node_map_old *nodemap;
        struct ctdb_context *ctdb = rec->ctdb;
 
        ZERO_STRUCTP(em);
@@ -2487,7 +2487,7 @@ static int send_election_request(struct ctdb_recoverd *rec, uint32_t pnn)
 static void unban_all_nodes(struct ctdb_context *ctdb)
 {
        int ret, i;
-       struct ctdb_node_map *nodemap;
+       struct ctdb_node_map_old *nodemap;
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
        
        ret = ctdb_ctrl_getnodemap(ctdb, CONTROL_TIMEOUT(), CTDB_CURRENT_NODE, tmp_ctx, &nodemap);
@@ -2905,7 +2905,7 @@ static void election_handler(uint64_t srvid, TDB_DATA data, void *private_data)
   force the start of the election process
  */
 static void force_election(struct ctdb_recoverd *rec, uint32_t pnn, 
-                          struct ctdb_node_map *nodemap)
+                          struct ctdb_node_map_old *nodemap)
 {
        int ret;
        struct ctdb_context *ctdb = rec->ctdb;
@@ -2949,7 +2949,7 @@ static void monitor_handler(uint64_t srvid, TDB_DATA data, void *private_data)
        struct ctdb_context *ctdb = rec->ctdb;
        int ret;
        struct ctdb_node_flag_change *c = (struct ctdb_node_flag_change *)data.dptr;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        TALLOC_CTX *tmp_ctx;
        int i;
        int disabled_flag_changed;
@@ -3025,7 +3025,7 @@ static void push_flags_handler(uint64_t srvid, TDB_DATA data,
        struct ctdb_context *ctdb = rec->ctdb;
        int ret;
        struct ctdb_node_flag_change *c = (struct ctdb_node_flag_change *)data.dptr;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
        uint32_t recmaster;
        uint32_t *nodes;
@@ -3105,7 +3105,7 @@ static void verify_recmode_normal_callback(struct ctdb_client_control_state *sta
 
 
 /* verify that all nodes are in normal recovery mode */
-static enum monitor_result verify_recmode(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap)
+static enum monitor_result verify_recmode(struct ctdb_context *ctdb, struct ctdb_node_map_old *nodemap)
 {
        struct verify_recmode_normal_data *rmdata;
        TALLOC_CTX *mem_ctx = talloc_new(ctdb);
@@ -3197,7 +3197,7 @@ static void verify_recmaster_callback(struct ctdb_client_control_state *state)
 
 
 /* verify that all nodes agree that we are the recmaster */
-static enum monitor_result verify_recmaster(struct ctdb_recoverd *rec, struct ctdb_node_map *nodemap, uint32_t pnn)
+static enum monitor_result verify_recmaster(struct ctdb_recoverd *rec, struct ctdb_node_map_old *nodemap, uint32_t pnn)
 {
        struct ctdb_context *ctdb = rec->ctdb;
        struct verify_recmaster_data *rmdata;
@@ -3314,7 +3314,7 @@ static bool interfaces_have_changed(struct ctdb_context *ctdb,
 
 /* called to check that the local allocation of public ip addresses is ok.
 */
-static int verify_local_ip_allocation(struct ctdb_context *ctdb, struct ctdb_recoverd *rec, uint32_t pnn, struct ctdb_node_map *nodemap)
+static int verify_local_ip_allocation(struct ctdb_context *ctdb, struct ctdb_recoverd *rec, uint32_t pnn, struct ctdb_node_map_old *nodemap)
 {
        TALLOC_CTX *mem_ctx = talloc_new(NULL);
        struct ctdb_uptime *uptime1 = NULL;
@@ -3453,20 +3453,20 @@ static int verify_local_ip_allocation(struct ctdb_context *ctdb, struct ctdb_rec
 
 static void async_getnodemap_callback(struct ctdb_context *ctdb, uint32_t node_pnn, int32_t res, TDB_DATA outdata, void *callback_data)
 {
-       struct ctdb_node_map **remote_nodemaps = callback_data;
+       struct ctdb_node_map_old **remote_nodemaps = callback_data;
 
        if (node_pnn >= ctdb->num_nodes) {
                DEBUG(DEBUG_ERR,(__location__ " pnn from invalid node\n"));
                return;
        }
 
-       remote_nodemaps[node_pnn] = (struct ctdb_node_map *)talloc_steal(remote_nodemaps, outdata.dptr);
+       remote_nodemaps[node_pnn] = (struct ctdb_node_map_old *)talloc_steal(remote_nodemaps, outdata.dptr);
 
 }
 
 static int get_remote_nodemaps(struct ctdb_context *ctdb, TALLOC_CTX *mem_ctx,
-       struct ctdb_node_map *nodemap,
-       struct ctdb_node_map **remote_nodemaps)
+       struct ctdb_node_map_old *nodemap,
+       struct ctdb_node_map_old **remote_nodemaps)
 {
        uint32_t *nodes;
 
@@ -3536,9 +3536,9 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
                      TALLOC_CTX *mem_ctx)
 {
        uint32_t pnn;
-       struct ctdb_node_map *nodemap=NULL;
-       struct ctdb_node_map *recmaster_nodemap=NULL;
-       struct ctdb_node_map **remote_nodemaps=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
+       struct ctdb_node_map_old *recmaster_nodemap=NULL;
+       struct ctdb_node_map_old **remote_nodemaps=NULL;
        struct ctdb_vnn_map *vnnmap=NULL;
        struct ctdb_vnn_map *remote_vnnmap=NULL;
        uint32_t num_lmasters;
@@ -3867,7 +3867,7 @@ static void main_loop(struct ctdb_context *ctdb, struct ctdb_recoverd *rec,
 
        /* get the nodemap for all active remote nodes
         */
-       remote_nodemaps = talloc_array(mem_ctx, struct ctdb_node_map *, nodemap->num);
+       remote_nodemaps = talloc_array(mem_ctx, struct ctdb_node_map_old *, nodemap->num);
        if (remote_nodemaps == NULL) {
                DEBUG(DEBUG_ERR, (__location__ " failed to allocate remote nodemap array\n"));
                return;
index 3ad24c977f70db3878d0cf9c460a4044b883d64a..98e483c4cb47d015eadfd4e706baea9ed2494b74 100644 (file)
@@ -89,7 +89,7 @@ int ctdb_set_recovery_lock_file(struct ctdb_context *ctdb, const char *file)
 /* Load a nodes list file into a nodes array */
 static int convert_node_map_to_list(struct ctdb_context *ctdb,
                                    TALLOC_CTX *mem_ctx,
-                                   struct ctdb_node_map *node_map,
+                                   struct ctdb_node_map_old *node_map,
                                    struct ctdb_node ***nodes,
                                    uint32_t *num_nodes)
 {
@@ -129,7 +129,7 @@ static int convert_node_map_to_list(struct ctdb_context *ctdb,
 /* Load the nodes list from a file */
 void ctdb_load_nodes_file(struct ctdb_context *ctdb)
 {
-       struct ctdb_node_map *node_map;
+       struct ctdb_node_map_old *node_map;
        int ret;
 
        node_map = ctdb_read_nodes_file(ctdb, ctdb->nodes_file);
index 78e9e7852c8bca71bc54cc0c7e5e78b94bf69584..829800a8caba73d45a63082ff77452ee537ae27b 100644 (file)
@@ -2111,7 +2111,7 @@ finished:
        talloc_free(tmp_ctx);
 }
 
-static bool all_nodes_are_disabled(struct ctdb_node_map *nodemap)
+static bool all_nodes_are_disabled(struct ctdb_node_map_old *nodemap)
 {
        int i;
 
@@ -2224,7 +2224,7 @@ static void get_tunable_fail_callback(struct ctdb_context *ctdb, uint32_t pnn,
 
 static uint32_t *get_tunable_from_nodes(struct ctdb_context *ctdb,
                                        TALLOC_CTX *tmp_ctx,
-                                       struct ctdb_node_map *nodemap,
+                                       struct ctdb_node_map_old *nodemap,
                                        const char *tunable,
                                        uint32_t default_value)
 {
@@ -2326,7 +2326,7 @@ static void get_runstate_fail_callback(struct ctdb_context *ctdb, uint32_t pnn,
 
 static enum ctdb_runstate * get_runstate_from_nodes(struct ctdb_context *ctdb,
                                                    TALLOC_CTX *tmp_ctx,
-                                                   struct ctdb_node_map *nodemap,
+                                                   struct ctdb_node_map_old *nodemap,
                                                    enum ctdb_runstate default_value)
 {
        uint32_t *nodes;
@@ -2372,7 +2372,7 @@ static enum ctdb_runstate * get_runstate_from_nodes(struct ctdb_context *ctdb,
 static struct ctdb_ipflags *
 set_ipflags_internal(struct ctdb_context *ctdb,
                     TALLOC_CTX *tmp_ctx,
-                    struct ctdb_node_map *nodemap,
+                    struct ctdb_node_map_old *nodemap,
                     uint32_t *tval_noiptakeover,
                     uint32_t *tval_noiphostonalldisabled,
                     enum ctdb_runstate *runstate)
@@ -2428,7 +2428,7 @@ set_ipflags_internal(struct ctdb_context *ctdb,
 
 static struct ctdb_ipflags *set_ipflags(struct ctdb_context *ctdb,
                                        TALLOC_CTX *tmp_ctx,
-                                       struct ctdb_node_map *nodemap)
+                                       struct ctdb_node_map_old *nodemap)
 {
        uint32_t *tval_noiptakeover;
        uint32_t *tval_noiphostonalldisabled;
@@ -2478,7 +2478,7 @@ struct iprealloc_callback_data {
        int retry_count;
        client_async_callback fail_callback;
        void *fail_callback_data;
-       struct ctdb_node_map *nodemap;
+       struct ctdb_node_map_old *nodemap;
 };
 
 static void iprealloc_fail_callback(struct ctdb_context *ctdb, uint32_t pnn,
@@ -2539,7 +2539,7 @@ struct takeover_callback_data {
        bool *node_failed;
        client_async_callback fail_callback;
        void *fail_callback_data;
-       struct ctdb_node_map *nodemap;
+       struct ctdb_node_map_old *nodemap;
 };
 
 static void takeover_run_fail_callback(struct ctdb_context *ctdb,
@@ -2572,7 +2572,7 @@ static void takeover_run_fail_callback(struct ctdb_context *ctdb,
 /*
   make any IP alias changes for public addresses that are necessary 
  */
-int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map *nodemap,
+int ctdb_takeover_run(struct ctdb_context *ctdb, struct ctdb_node_map_old *nodemap,
                      uint32_t *force_rebalance_nodes,
                      client_async_callback fail_callback, void *callback_data)
 {
index 53b20b92b3d485e450baa0bf7303c6e7d168f467..a9c0658d8a9638400eb8b253eeeca090a39574d5 100644 (file)
@@ -822,7 +822,7 @@ static void ctdb_process_delete_list(struct ctdb_db_context *ctdb_db,
        struct ctdb_context *ctdb = ctdb_db->ctdb;
        struct delete_records_list *recs;
        TDB_DATA indata;
-       struct ctdb_node_map *nodemap;
+       struct ctdb_node_map_old *nodemap;
        uint32_t *active_nodes;
        int num_active_nodes;
        TALLOC_CTX *tmp_ctx;
index 7ff875572589962f97c02b94da2974de43857052..7fc7dec1994bff8f8cb9e496e22c536a97eb0d57 100644 (file)
@@ -416,7 +416,7 @@ static void ctdb_test_init(const char nodestates[],
        int i, numnodes;
        uint32_t nodeflags[CTDB_TEST_MAX_NODES];
        char *tok, *ns, *t;
-       struct ctdb_node_map *nodemap;
+       struct ctdb_node_map_old *nodemap;
        uint32_t *tval_noiptakeover;
        uint32_t *tval_noiptakeoverondisabled;
        enum ctdb_runstate *runstate;
@@ -469,7 +469,7 @@ static void ctdb_test_init(const char nodestates[],
 
        runstate = get_runstate(*ctdb, numnodes);
 
-       nodemap =  talloc_array(*ctdb, struct ctdb_node_map, numnodes);
+       nodemap =  talloc_array(*ctdb, struct ctdb_node_map_old, numnodes);
        nodemap->num = numnodes;
 
        if (!read_ips_for_multiple_nodes) {
index 33f198a51535d7e03fcadbdf06d763b2ef86e68d..7afc00d6dcafcd7629076e488465f1ec1ce86412 100644 (file)
@@ -106,11 +106,11 @@ struct tevent_context *tevent_context_init(TALLOC_CTX *mem_ctx);
 
 int ctdb_ctrl_getnodemap(struct ctdb_context *ctdb,
                    struct timeval timeout, uint32_t destnode,
-                   TALLOC_CTX *mem_ctx, struct ctdb_node_map **nodemap);
+                   TALLOC_CTX *mem_ctx, struct ctdb_node_map_old **nodemap);
 int ctdb_ctrl_getnodesfile(struct ctdb_context *ctdb,
                           struct timeval timeout, uint32_t destnode,
                           TALLOC_CTX *mem_ctx,
-                          struct ctdb_node_map **nodemap);
+                          struct ctdb_node_map_old **nodemap);
 int ctdb_ctrl_get_ifaces(struct ctdb_context *ctdb,
                         struct timeval timeout, uint32_t destnode,
                         TALLOC_CTX *mem_ctx,
@@ -164,7 +164,7 @@ struct ctdb_node_capabilities *
 ctdb_get_capabilities(struct ctdb_context *ctdb,
                      TALLOC_CTX *mem_ctx,
                      struct timeval timeout,
-                     struct ctdb_node_map *nodemap);
+                     struct ctdb_node_map_old *nodemap);
 
 #undef TIMELIMIT
 
index f8bf2221d9063f9ae241c69116b9e4ca87bc6e39..3a04c170aaa07c5d2ee9b08ec940e54e6b246242 100644 (file)
@@ -433,7 +433,7 @@ int
 ctdb_ctrl_getnodemap_stub(struct ctdb_context *ctdb,
                          struct timeval timeout, uint32_t destnode,
                          TALLOC_CTX *mem_ctx,
-                         struct ctdb_node_map **nodemap)
+                         struct ctdb_node_map_old **nodemap)
 {
        assert_nodes_set(ctdb);
 
@@ -450,7 +450,7 @@ ctdb_ctrl_getnodemap_stub(struct ctdb_context *ctdb,
 int
 ctdb_ctrl_getnodesfile_stub(struct ctdb_context *ctdb,
                            struct timeval timeout, uint32_t destnode,
-                           TALLOC_CTX *mem_ctx, struct ctdb_node_map **nodemap)
+                           TALLOC_CTX *mem_ctx, struct ctdb_node_map_old **nodemap)
 {
        char *v, *f;
 
@@ -824,7 +824,7 @@ ctdb_client_async_control_stub(struct ctdb_context *ctdb,
                        res = 0;
                        break;
                case CTDB_CONTROL_GET_NODES_FILE: {
-                       struct ctdb_node_map *nodemap;
+                       struct ctdb_node_map_old *nodemap;
                        res = ctdb_ctrl_getnodesfile_stub(ctdb, timeout, pnn,
                                                          tmp_ctx, &nodemap);
                        if (res == 0) {
@@ -860,7 +860,7 @@ struct ctdb_node_capabilities *
 ctdb_get_capabilities_stub(struct ctdb_context *ctdb,
                           TALLOC_CTX *mem_ctx,
                           struct timeval timeout,
-                          struct ctdb_node_map *nodemap)
+                          struct ctdb_node_map_old *nodemap)
 {
        return global_caps;
 }
index 64b8a6c40de302f5a95f011d8f8915e95f1af6b3..184321fbdaf0bd9ef1f98ad0f13ba1203541ed30 100644 (file)
@@ -245,7 +245,7 @@ static bool parse_nodestring(struct ctdb_context *ctdb,
        TALLOC_CTX *tmp_ctx = talloc_new(mem_ctx);
        int n;
        uint32_t i;
-       struct ctdb_node_map *nodemap;
+       struct ctdb_node_map_old *nodemap;
        int ret;
 
        *nodes = NULL;
@@ -886,7 +886,7 @@ static int control_pnn(struct ctdb_context *ctdb, int argc, const char **argv)
 }
 
 
-static struct ctdb_node_map *read_nodes_file(TALLOC_CTX *mem_ctx)
+static struct ctdb_node_map_old *read_nodes_file(TALLOC_CTX *mem_ctx)
 {
        const char *nodes_list;
 
@@ -912,7 +912,7 @@ static struct ctdb_node_map *read_nodes_file(TALLOC_CTX *mem_ctx)
 static int find_node_xpnn(void)
 {
        TALLOC_CTX *mem_ctx = talloc_new(NULL);
-       struct ctdb_node_map *node_map;
+       struct ctdb_node_map_old *node_map;
        int i, pnn;
 
        node_map = read_nodes_file(mem_ctx);
@@ -1021,7 +1021,7 @@ static int control_status(struct ctdb_context *ctdb, int argc, const char **argv
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
        int i;
        struct ctdb_vnn_map *vnnmap=NULL;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        uint32_t recmode, recmaster, mypnn;
        int num_deleted_nodes = 0;
        int ret;
@@ -1106,7 +1106,7 @@ static int control_nodestatus(struct ctdb_context *ctdb, int argc, const char **
 {
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
        int i, ret;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        uint32_t * nodes;
        uint32_t pnn_mode, mypnn;
 
@@ -1150,11 +1150,11 @@ static int control_nodestatus(struct ctdb_context *ctdb, int argc, const char **
        return ret;
 }
 
-static struct ctdb_node_map *read_natgw_nodes_file(struct ctdb_context *ctdb,
+static struct ctdb_node_map_old *read_natgw_nodes_file(struct ctdb_context *ctdb,
                                                   TALLOC_CTX *mem_ctx)
 {
        const char *natgw_list;
-       struct ctdb_node_map *natgw_nodes = NULL;
+       struct ctdb_node_map_old *natgw_nodes = NULL;
 
        natgw_list = getenv("CTDB_NATGW_NODES");
        if (natgw_list == NULL) {
@@ -1176,20 +1176,20 @@ static struct ctdb_node_map *read_natgw_nodes_file(struct ctdb_context *ctdb,
 
 
 /* talloc off the existing nodemap... */
-static struct ctdb_node_map *talloc_nodemap(struct ctdb_node_map *nodemap)
+static struct ctdb_node_map_old *talloc_nodemap(struct ctdb_node_map_old *nodemap)
 {
        return talloc_zero_size(nodemap,
-                               offsetof(struct ctdb_node_map, nodes) +
+                               offsetof(struct ctdb_node_map_old, nodes) +
                                nodemap->num * sizeof(struct ctdb_node_and_flags));
 }
 
-static struct ctdb_node_map *
+static struct ctdb_node_map_old *
 filter_nodemap_by_addrs(struct ctdb_context *ctdb,
-                       struct ctdb_node_map *nodemap,
-                       struct ctdb_node_map *natgw_nodes)
+                       struct ctdb_node_map_old *nodemap,
+                       struct ctdb_node_map_old *natgw_nodes)
 {
        int i, j;
-       struct ctdb_node_map *ret;
+       struct ctdb_node_map_old *ret;
 
        ret = talloc_nodemap(nodemap);
        CTDB_NO_MEMORY_NULL(ctdb, ret);
@@ -1214,15 +1214,15 @@ filter_nodemap_by_addrs(struct ctdb_context *ctdb,
        return ret;
 }
 
-static struct ctdb_node_map *
+static struct ctdb_node_map_old *
 filter_nodemap_by_capabilities(struct ctdb_context *ctdb,
-                              struct ctdb_node_map *nodemap,
+                              struct ctdb_node_map_old *nodemap,
                               uint32_t required_capabilities,
                               bool first_only)
 {
        int i;
        uint32_t capabilities;
-       struct ctdb_node_map *ret;
+       struct ctdb_node_map_old *ret;
 
        ret = talloc_nodemap(nodemap);
        CTDB_NO_MEMORY_NULL(ctdb, ret);
@@ -1260,13 +1260,13 @@ filter_nodemap_by_capabilities(struct ctdb_context *ctdb,
        return ret;
 }
 
-static struct ctdb_node_map *
+static struct ctdb_node_map_old *
 filter_nodemap_by_flags(struct ctdb_context *ctdb,
-                       struct ctdb_node_map *nodemap,
+                       struct ctdb_node_map_old *nodemap,
                        uint32_t flags_mask)
 {
        int i;
-       struct ctdb_node_map *ret;
+       struct ctdb_node_map_old *ret;
 
        ret = talloc_nodemap(nodemap);
        CTDB_NO_MEMORY_NULL(ctdb, ret);
@@ -1292,9 +1292,9 @@ static int control_natgwlist(struct ctdb_context *ctdb, int argc, const char **a
 {
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
        int i, ret;
-       struct ctdb_node_map *natgw_nodes = NULL;
-       struct ctdb_node_map *orig_nodemap=NULL;
-       struct ctdb_node_map *nodemap;
+       struct ctdb_node_map_old *natgw_nodes = NULL;
+       struct ctdb_node_map_old *orig_nodemap=NULL;
+       struct ctdb_node_map_old *nodemap;
        uint32_t mypnn, pnn;
        const char *ip;
 
@@ -1342,7 +1342,7 @@ static int control_natgwlist(struct ctdb_context *ctdb, int argc, const char **a
        for (i = 0; exclude_flags[i] != 0; i++) {
                /* ... get a nodemap that excludes nodes with with
                 * masked flags... */
-               struct ctdb_node_map *t =
+               struct ctdb_node_map_old *t =
                        filter_nodemap_by_flags(ctdb, nodemap,
                                                exclude_flags[i]);
                if (t == NULL) {
@@ -1353,7 +1353,7 @@ static int control_natgwlist(struct ctdb_context *ctdb, int argc, const char **a
                if (t->num > 0) {
                        /* ... and find the first node with the NATGW
                         * capability */
-                       struct ctdb_node_map *n;
+                       struct ctdb_node_map_old *n;
                        n = filter_nodemap_by_capabilities(ctdb, t,
                                                           CTDB_CAP_NATGW,
                                                           true);
@@ -1754,7 +1754,7 @@ static int move_ip(struct ctdb_context *ctdb, ctdb_sock_addr *addr, uint32_t pnn
        uint32_t *nodes;
        uint32_t disable_time;
        TDB_DATA data;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
 
        disable_time = 30;
@@ -1844,7 +1844,7 @@ find_other_host_for_public_ip(struct ctdb_context *ctdb, ctdb_sock_addr *addr)
 {
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
        struct ctdb_all_public_ips *ips;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        int i, j, ret;
        int pnn;
 
@@ -2005,7 +2005,7 @@ static int rebalance_ip(struct ctdb_context *ctdb, ctdb_sock_addr *addr)
        uint32_t *nodes;
        uint32_t disable_time;
        TDB_DATA data;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
 
        disable_time = 30;
@@ -2130,7 +2130,7 @@ static int
 control_get_all_public_ips(struct ctdb_context *ctdb, TALLOC_CTX *tmp_ctx, struct ctdb_all_public_ips **ips)
 {
        struct ctdb_all_public_ips *tmp_ips;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        trbt_tree_t *ip_tree;
        int i, j, len, ret;
        uint32_t count;
@@ -2301,7 +2301,7 @@ again:
        reply_data.done = false;
 
        if (wait_for_all) {
-               struct ctdb_node_map *nodemap;
+               struct ctdb_node_map_old *nodemap;
 
                ret = ctdb_ctrl_getnodemap(ctdb, TIMELIMIT(),
                                           CTDB_CURRENT_NODE, ctdb, &nodemap);
@@ -2481,7 +2481,7 @@ static int control_delip(struct ctdb_context *ctdb, int argc, const char **argv)
 static int control_delip_all(struct ctdb_context *ctdb, int argc, const char **argv, ctdb_sock_addr *addr)
 {
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        struct ctdb_all_public_ips *ips;
        int ret, i, j;
 
@@ -3250,7 +3250,7 @@ static int update_flags_and_ipreallocate(struct ctdb_context *ctdb,
                                              const char *desc,
                                              bool set_flag)
 {
-       struct ctdb_node_map *nodemap = NULL;
+       struct ctdb_node_map_old *nodemap = NULL;
        bool flag_is_set;
        int ret;
 
@@ -3473,7 +3473,7 @@ static int control_unban(struct ctdb_context *ctdb, int argc, const char **argv)
 static int control_showban(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        int ret;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        struct ctdb_ban_time *bantime;
 
        /* verify the node exists */
@@ -3613,8 +3613,8 @@ static uint32_t lvs_exclude_flags[] = {
 static int control_lvs(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
-       struct ctdb_node_map *orig_nodemap=NULL;
-       struct ctdb_node_map *nodemap;
+       struct ctdb_node_map_old *orig_nodemap=NULL;
+       struct ctdb_node_map_old *nodemap;
        int i, ret;
 
        ret = ctdb_ctrl_getnodemap(ctdb, TIMELIMIT(), options.pnn,
@@ -3636,7 +3636,7 @@ static int control_lvs(struct ctdb_context *ctdb, int argc, const char **argv)
        ret = 0;
 
        for (i = 0; lvs_exclude_flags[i] != 0; i++) {
-               struct ctdb_node_map *t =
+               struct ctdb_node_map_old *t =
                        filter_nodemap_by_flags(ctdb, nodemap,
                                                lvs_exclude_flags[i]);
                if (t == NULL) {
@@ -3666,7 +3666,7 @@ done:
 static int control_lvsmaster(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        int i, ret;
 
        ret = ctdb_ctrl_getnodemap(ctdb, TIMELIMIT(), options.pnn,
@@ -3678,7 +3678,7 @@ static int control_lvsmaster(struct ctdb_context *ctdb, int argc, const char **a
        }
 
        for (i = 0; lvs_exclude_flags[i] != 0; i++) {
-               struct ctdb_node_map *t =
+               struct ctdb_node_map_old *t =
                        filter_nodemap_by_flags(ctdb, nodemap,
                                                lvs_exclude_flags[i]);
                if (t == NULL) {
@@ -3687,7 +3687,7 @@ static int control_lvsmaster(struct ctdb_context *ctdb, int argc, const char **a
                        goto done;
                }
                if (t->num > 0) {
-                       struct ctdb_node_map *n;
+                       struct ctdb_node_map_old *n;
                        n = filter_nodemap_by_capabilities(ctdb,
                                                           t,
                                                           CTDB_CAP_LVS,
@@ -5130,7 +5130,7 @@ static int control_detach(struct ctdb_context *ctdb, int argc,
        uint32_t db_id;
        uint8_t flags;
        int ret, i, status = 0;
-       struct ctdb_node_map *nodemap = NULL;
+       struct ctdb_node_map_old *nodemap = NULL;
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
        uint32_t recmode;
 
@@ -5597,7 +5597,7 @@ static int control_restoredb(struct ctdb_context *ctdb, int argc, const char **a
        TDB_DATA data;
        struct db_file_header dbhdr;
        struct ctdb_db_context *ctdb_db;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        struct ctdb_vnn_map *vnnmap=NULL;
        int i, fh;
        struct ctdb_control_transdb w;
@@ -5878,7 +5878,7 @@ static int control_wipedb(struct ctdb_context *ctdb, int argc,
        TALLOC_CTX *tmp_ctx = talloc_new(ctdb);
        TDB_DATA data;
        struct ctdb_db_context *ctdb_db;
-       struct ctdb_node_map *nodemap = NULL;
+       struct ctdb_node_map_old *nodemap = NULL;
        struct ctdb_vnn_map *vnnmap = NULL;
        int i;
        struct ctdb_control_transdb w;
@@ -6164,7 +6164,7 @@ static int control_msglisten(struct ctdb_context *ctdb, int argc, const char **a
 static int control_listnodes(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        TALLOC_CTX *mem_ctx = talloc_new(NULL);
-       struct ctdb_node_map *node_map;
+       struct ctdb_node_map_old *node_map;
        int i;
 
        assert_single_node_only();
@@ -6200,10 +6200,10 @@ static void get_nodes_files_callback(struct ctdb_context *ctdb,
                                     uint32_t node_pnn, int32_t res,
                                     TDB_DATA outdata, void *callback_data)
 {
-       struct ctdb_node_map **maps =
-               talloc_get_type(callback_data, struct ctdb_node_map *);
+       struct ctdb_node_map_old **maps =
+               talloc_get_type(callback_data, struct ctdb_node_map_old *);
 
-       if (outdata.dsize < offsetof(struct ctdb_node_map, nodes) ||
+       if (outdata.dsize < offsetof(struct ctdb_node_map_old, nodes) ||
            outdata.dptr == NULL) {
                DEBUG(DEBUG_ERR,
                      (__location__ " Invalid return data: %u %p\n",
@@ -6228,17 +6228,17 @@ static void get_nodes_files_fail_callback(struct ctdb_context *ctdb,
              ("ERROR: Failed to get nodes file from node %u\n", node_pnn));
 }
 
-static struct ctdb_node_map **
+static struct ctdb_node_map_old **
 ctdb_get_nodes_files(struct ctdb_context *ctdb,
                     TALLOC_CTX *mem_ctx,
                     struct timeval timeout,
-                    struct ctdb_node_map *nodemap)
+                    struct ctdb_node_map_old *nodemap)
 {
        uint32_t *nodes;
        int ret;
-       struct ctdb_node_map **maps;
+       struct ctdb_node_map_old **maps;
 
-       maps = talloc_zero_array(mem_ctx, struct ctdb_node_map *, nodemap->num);
+       maps = talloc_zero_array(mem_ctx, struct ctdb_node_map_old *, nodemap->num);
        CTDB_NO_MEMORY_NULL(ctdb, maps);
 
        nodes = list_of_connected_nodes(ctdb, nodemap, mem_ctx, true);
@@ -6257,8 +6257,8 @@ ctdb_get_nodes_files(struct ctdb_context *ctdb,
        return maps;
 }
 
-static bool node_files_are_identical(struct ctdb_node_map *nm1,
-                                    struct ctdb_node_map *nm2)
+static bool node_files_are_identical(struct ctdb_node_map_old *nm1,
+                                    struct ctdb_node_map_old *nm2)
 {
        int i;
 
@@ -6278,10 +6278,10 @@ static bool node_files_are_identical(struct ctdb_node_map *nm1,
 static bool check_all_node_files_are_identical(struct ctdb_context *ctdb,
                                               TALLOC_CTX *mem_ctx,
                                               struct timeval timeout,
-                                              struct ctdb_node_map *nodemap,
-                                              struct ctdb_node_map *file_nodemap)
+                                              struct ctdb_node_map_old *nodemap,
+                                              struct ctdb_node_map_old *file_nodemap)
 {
-       static struct ctdb_node_map **maps;
+       static struct ctdb_node_map_old **maps;
        int i;
        bool ret = true;
 
@@ -6309,8 +6309,8 @@ static bool check_all_node_files_are_identical(struct ctdb_context *ctdb,
   reload the nodes file on the local node
  */
 static bool sanity_check_nodes_file_changes(TALLOC_CTX *mem_ctx,
-                                           struct ctdb_node_map *nodemap,
-                                           struct ctdb_node_map *file_nodemap)
+                                           struct ctdb_node_map_old *nodemap,
+                                           struct ctdb_node_map_old *file_nodemap)
 {
        int i;
        bool should_abort = false;
@@ -6403,9 +6403,9 @@ static void reload_nodes_fail_callback(struct ctdb_context *ctdb,
 static int control_reload_nodes_file(struct ctdb_context *ctdb, int argc, const char **argv)
 {
        int i, ret;
-       struct ctdb_node_map *nodemap=NULL;
+       struct ctdb_node_map_old *nodemap=NULL;
        TALLOC_CTX *tmp_ctx = talloc_new(NULL);
-       struct ctdb_node_map *file_nodemap;
+       struct ctdb_node_map_old *file_nodemap;
        uint32_t *conn;
        uint32_t timeout;
 
index 3ddbf41e9a55ba5a26468ab92d381688184205b7..9bb60307148888078801123cde5f1b16cf6b3e8f 100644 (file)
@@ -198,7 +198,7 @@ static bool ctdbd_working(struct ctdbd_connection *conn, uint32_t vnn)
 {
        int32_t cstatus=-1;
        TDB_DATA outdata;
-       struct ctdb_node_map *m;
+       struct ctdb_node_map_old *m;
        uint32_t failure_flags;
        bool ok = false;
        int i, ret;
@@ -215,7 +215,7 @@ static bool ctdbd_working(struct ctdbd_connection *conn, uint32_t vnn)
                return false;
        }
 
-       m = (struct ctdb_node_map *)outdata.dptr;
+       m = (struct ctdb_node_map_old *)outdata.dptr;
 
        for (i=0; i<m->num; i++) {
                if (vnn == m->nodes[i].pnn) {