Lines Matching refs:node
34 * Connections are initiated between a pair of nodes when the node with the
35 * higher node number gets a heartbeat callback which indicates that the lower
36 * numbered node has started heartbeating. The lower numbered node is passive
37 * and only accepts the connection if the higher numbered node is heartbeating.
62 #define SC_NODEF_FMT "node %s (num %u) at %pI4:%u"
84 mlog(ML_SOCKET, "[sc %p refs %d sock %p node %u page %p " \
103 * tears down all the node's sock containers, preventing future shutdowns
134 u32 msgkey, struct task_struct *task, u8 node)
140 nst->st_node = node;
361 mlog(0, "completed %d messages for node %u\n", num_kills,
411 static struct o2net_sock_container *sc_alloc(struct o2nm_node *node)
423 o2nm_node_get(node);
424 sc->sc_node = node;
426 /* pin the node item of the remote node */
427 status = o2nm_depend_item(&node->nd_item);
430 o2nm_node_put(node);
502 /* the node num comparison and single connect/accept path should stop
511 mlog(ML_CONN, "node %u sc: %p -> %p, valid %u -> %u, err %d -> %d\n",
547 * from node config teardown and so needs to be careful about
998 /* Get a map of all nodes to which this node is currently connected to */
1002 int node, ret;
1005 for (node = 0; node < O2NM_MAX_NODES; ++node) {
1006 if (!o2net_tx_can_proceed(o2net_nn_from_num(node), &sc, &ret))
1009 set_bit(node, map);
1108 /* wait on other node's handler */
1124 o2net_debug_del_nst(&nst); /* must be before dropping sc and node */
1276 * we can end up with one node thinking that the other must be down,
1553 struct o2nm_node *node = NULL, *mynode = NULL;
1569 /* watch for racing with tearing a node down */
1570 node = o2nm_get_node_by_num(o2net_num_from_nn(nn));
1571 if (node == NULL)
1583 * at least connected to that node successfully once,
1596 sc = sc_alloc(node);
1636 remoteaddr.sin_addr.s_addr = node->nd_ipv4_address;
1637 remoteaddr.sin_port = node->nd_ipv4_port;
1656 if (node)
1657 o2nm_node_put(node);
1673 "node %u after %u.%u seconds, check network and"
1694 void o2net_disconnect_node(struct o2nm_node *node)
1696 struct o2net_node *nn = o2net_nn_from_num(node->nd_num);
1712 static void o2net_hb_node_down_cb(struct o2nm_node *node, int node_num,
1717 if (!node)
1721 o2net_disconnect_node(node);
1726 static void o2net_hb_node_up_cb(struct o2nm_node *node, int node_num,
1733 BUG_ON(!node);
1740 /* believe it or not, accept and node heartbeating testing
1741 * can succeed for this node before we got here.. so
1784 struct o2nm_node *node = NULL;
1819 node = o2nm_get_node_by_ip(sin.sin_addr.s_addr);
1820 if (node == NULL) {
1822 "node at %pI4:%d\n", &sin.sin_addr.s_addr,
1828 if (o2nm_this_node() >= node->nd_num) {
1832 "seen at node '%s' (%u, %pI4:%d) from "
1833 "node '%s' (%u, %pI4:%d)\n",
1837 node->nd_name,
1838 node->nd_num, &sin.sin_addr.s_addr,
1844 /* this happens all the time when the other node sees our heartbeat
1846 if (!o2hb_check_node_heartbeating_from_callback(node->nd_num)) {
1847 mlog(ML_CONN, "attempt to connect from node '%s' at "
1849 node->nd_name, &sin.sin_addr.s_addr,
1855 nn = o2net_nn_from_num(node->nd_num);
1864 printk(KERN_NOTICE "o2net: Attempt to connect from node '%s' "
1866 node->nd_name, &sin.sin_addr.s_addr,
1871 sc = sc_alloc(node);
1894 if (node)
1895 o2nm_node_put(node);
2023 * called from node manager when we should bring up our network listening
2024 * socket. node manager handles all the serialization to only call this
2029 int o2net_start_listening(struct o2nm_node *node)
2043 ret = o2net_open_listening_sock(node->nd_ipv4_address,
2044 node->nd_ipv4_port);
2049 o2quo_conn_up(node->nd_num);
2056 void o2net_stop_listening(struct o2nm_node *node)
2071 struct o2nm_node *node = o2nm_get_node_by_num(i);
2072 if (node) {
2073 o2net_disconnect_node(node);
2074 o2nm_node_put(node);
2086 o2quo_conn_err(node->nd_num);
2126 /* until we see hb from a node we'll return einval */