Lines Matching refs:node

36  * Connections are initiated between a pair of nodes when the node with the
37 * higher node number gets a heartbeat callback which indicates that the lower
38 * numbered node has started heartbeating. The lower numbered node is passive
39 * and only accepts the connection if the higher numbered node is heartbeating.
63 #define SC_NODEF_FMT "node %s (num %u) at %pI4:%u"
85 mlog(ML_SOCKET, "[sc %p refs %d sock %p node %u page %p " \
104 * tears down all the node's sock containers, preventing future shutdowns
135 u32 msgkey, struct task_struct *task, u8 node)
141 nst->st_node = node;
362 mlog(0, "completed %d messages for node %u\n", num_kills,
412 static struct o2net_sock_container *sc_alloc(struct o2nm_node *node)
424 o2nm_node_get(node);
425 sc->sc_node = node;
427 /* pin the node item of the remote node */
428 status = o2nm_depend_item(&node->nd_item);
431 o2nm_node_put(node);
503 /* the node num comparison and single connect/accept path should stop
512 mlog(ML_CONN, "node %u sc: %p -> %p, valid %u -> %u, err %d -> %d\n",
548 * from node config teardown and so needs to be careful about
994 /* Get a map of all nodes to which this node is currently connected to */
998 int node, ret;
1003 for (node = 0; node < O2NM_MAX_NODES; ++node) {
1004 if (!o2net_tx_can_proceed(o2net_nn_from_num(node), &sc, &ret))
1007 set_bit(node, map);
1106 /* wait on other node's handler */
1122 o2net_debug_del_nst(&nst); /* must be before dropping sc and node */
1275 * we can end up with one node thinking that the other must be down,
1552 struct o2nm_node *node = NULL, *mynode = NULL;
1568 /* watch for racing with tearing a node down */
1569 node = o2nm_get_node_by_num(o2net_num_from_nn(nn));
1570 if (node == NULL)
1582 * at least connected to that node successfully once,
1595 sc = sc_alloc(node);
1634 remoteaddr.sin_addr.s_addr = node->nd_ipv4_address;
1635 remoteaddr.sin_port = node->nd_ipv4_port;
1654 if (node)
1655 o2nm_node_put(node);
1671 "node %u after %u.%u seconds, check network and"
1692 void o2net_disconnect_node(struct o2nm_node *node)
1694 struct o2net_node *nn = o2net_nn_from_num(node->nd_num);
1710 static void o2net_hb_node_down_cb(struct o2nm_node *node, int node_num,
1715 if (!node)
1719 o2net_disconnect_node(node);
1724 static void o2net_hb_node_up_cb(struct o2nm_node *node, int node_num,
1731 BUG_ON(!node);
1738 /* believe it or not, accept and node heartbeating testing
1739 * can succeed for this node before we got here.. so
1782 struct o2nm_node *node = NULL;
1817 node = o2nm_get_node_by_ip(sin.sin_addr.s_addr);
1818 if (node == NULL) {
1820 "node at %pI4:%d\n", &sin.sin_addr.s_addr,
1826 if (o2nm_this_node() >= node->nd_num) {
1830 "seen at node '%s' (%u, %pI4:%d) from "
1831 "node '%s' (%u, %pI4:%d)\n",
1835 node->nd_name,
1836 node->nd_num, &sin.sin_addr.s_addr,
1842 /* this happens all the time when the other node sees our heartbeat
1844 if (!o2hb_check_node_heartbeating_from_callback(node->nd_num)) {
1845 mlog(ML_CONN, "attempt to connect from node '%s' at "
1847 node->nd_name, &sin.sin_addr.s_addr,
1853 nn = o2net_nn_from_num(node->nd_num);
1862 printk(KERN_NOTICE "o2net: Attempt to connect from node '%s' "
1864 node->nd_name, &sin.sin_addr.s_addr,
1869 sc = sc_alloc(node);
1892 if (node)
1893 o2nm_node_put(node);
2019 * called from node manager when we should bring up our network listening
2020 * socket. node manager handles all the serialization to only call this
2025 int o2net_start_listening(struct o2nm_node *node)
2039 ret = o2net_open_listening_sock(node->nd_ipv4_address,
2040 node->nd_ipv4_port);
2045 o2quo_conn_up(node->nd_num);
2052 void o2net_stop_listening(struct o2nm_node *node)
2067 struct o2nm_node *node = o2nm_get_node_by_num(i);
2068 if (node) {
2069 o2net_disconnect_node(node);
2070 o2nm_node_put(node);
2082 o2quo_conn_err(node->nd_num);
2116 /* until we see hb from a node we'll return einval */