ctdb-daemon: Move CTDB VNN structure to IP takeover code
authorMartin Schwenke <martin@meltin.net>
Mon, 13 Jun 2016 20:44:29 +0000 (06:44 +1000)
committerStefan Metzmacher <metze@samba.org>
Thu, 28 Jul 2016 03:00:15 +0000 (05:00 +0200)
It is only used in this code.

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

index bbbaa77527ec2f133147d79368500f1259963147..26e9b4396bbbbf52b297319f1a917425395a0d0f 100644 (file)
@@ -71,39 +71,6 @@ struct ctdb_client {
        struct ctdb_client_notify_list *notify;
 };
 
-/* state associated with a public ip address */
-struct ctdb_vnn {
-       struct ctdb_vnn *prev, *next;
-
-       struct ctdb_interface *iface;
-       const char **ifaces;
-       ctdb_sock_addr public_address;
-       uint8_t public_netmask_bits;
-
-       /* the node number that is serving this public address, if any. 
-          If no node serves this ip it is set to -1 */
-       int32_t pnn;
-
-       /* List of clients to tickle for this public address */
-       struct ctdb_tcp_array *tcp_array;
-
-       /* whether we need to update the other nodes with changes to our list
-          of connected clients */
-       bool tcp_update_needed;
-
-       /* a context to hang sending gratious arp events off */
-       TALLOC_CTX *takeover_ctx;
-
-       /* Set to true any time an update to this VNN is in flight.
-          This helps to avoid races. */
-       bool update_in_flight;
-
-       /* If CTDB_CONTROL_DEL_PUBLIC_IP is received for this IP
-        * address then this flag is set.  It will be deleted in the
-        * release IP callback. */
-       bool delete_pending;
-};
-
 /*
   state associated with one node
 */
index e6d3b325f09f7371c5c0ce1576e1a8a162a019e1..84dcd98ccbf1d4e1b71f95b9f2b37b0a889558c6 100644 (file)
@@ -55,6 +55,39 @@ struct ctdb_interface {
        uint32_t references;
 };
 
+/* state associated with a public ip address */
+struct ctdb_vnn {
+       struct ctdb_vnn *prev, *next;
+
+       struct ctdb_interface *iface;
+       const char **ifaces;
+       ctdb_sock_addr public_address;
+       uint8_t public_netmask_bits;
+
+       /* the node number that is serving this public address, if any.
+          If no node serves this ip it is set to -1 */
+       int32_t pnn;
+
+       /* List of clients to tickle for this public address */
+       struct ctdb_tcp_array *tcp_array;
+
+       /* whether we need to update the other nodes with changes to our list
+          of connected clients */
+       bool tcp_update_needed;
+
+       /* a context to hang sending gratious arp events off */
+       TALLOC_CTX *takeover_ctx;
+
+       /* Set to true any time an update to this VNN is in flight.
+          This helps to avoid races. */
+       bool update_in_flight;
+
+       /* If CTDB_CONTROL_DEL_PUBLIC_IP is received for this IP
+        * address then this flag is set.  It will be deleted in the
+        * release IP callback. */
+       bool delete_pending;
+};
+
 static const char *ctdb_vnn_iface_string(const struct ctdb_vnn *vnn)
 {
        if (vnn->iface) {