Lines Matching defs:node

12  * that a node is broken and should be recovered.  They can't both recover each
17 * So we declare that a node which has given up on connecting to a majority
20 * There are huge opportunities for races here. After we give up on a node's
22 * to declare the node as truly dead. We also need to be careful with the
23 * race between when we see a node start heartbeating and when we connect
83 * go away as our node would be fenced externally before other nodes
115 mlog(ML_ERROR, "fencing this node because it is "
126 * the lowest numbered node */
129 mlog(ML_ERROR, "fencing this node because it is "
138 mlog(ML_ERROR, "fencing this node because it is "
141 "node %u\n", quorum, qs->qs_heartbeating,
152 mlog(ML_NOTICE, "not fencing this node, heartbeating: %d, "
162 static void o2quo_set_hold(struct o2quo_state *qs, u8 node)
166 if (!test_and_set_bit(node, qs->qs_hold_bm)) {
169 "node %u\n", node);
170 mlog(0, "node %u, %d total\n", node, qs->qs_holds);
174 static void o2quo_clear_hold(struct o2quo_state *qs, u8 node)
178 if (test_and_clear_bit(node, qs->qs_hold_bm)) {
179 mlog(0, "node %u, %d total\n", node, qs->qs_holds - 1);
186 mlog_bug_on_msg(qs->qs_holds < 0, "node %u, holds %d\n",
187 node, qs->qs_holds);
191 /* as a node comes up we delay the quorum decision until we know the fate of
195 void o2quo_hb_up(u8 node)
203 "node %u\n", node);
204 mlog_bug_on_msg(test_bit(node, qs->qs_hb_bm), "node %u\n", node);
205 set_bit(node, qs->qs_hb_bm);
207 mlog(0, "node %u, %d total\n", node, qs->qs_heartbeating);
209 if (!test_bit(node, qs->qs_conn_bm))
210 o2quo_set_hold(qs, node);
212 o2quo_clear_hold(qs, node);
217 /* hb going down releases any holds we might have had due to this node from
219 void o2quo_hb_down(u8 node)
227 "node %u, %d heartbeating\n",
228 node, qs->qs_heartbeating);
229 mlog_bug_on_msg(!test_bit(node, qs->qs_hb_bm), "node %u\n", node);
230 clear_bit(node, qs->qs_hb_bm);
232 mlog(0, "node %u, %d total\n", node, qs->qs_heartbeating);
234 o2quo_clear_hold(qs, node);
239 /* this tells us that we've decided that the node is still heartbeating
244 void o2quo_hb_still_up(u8 node)
250 mlog(0, "node %u\n", node);
253 o2quo_clear_hold(qs, node);
258 /* This is analogous to hb_up. as a node's connection comes up we delay the
263 void o2quo_conn_up(u8 node)
271 "node %u\n", node);
272 mlog_bug_on_msg(test_bit(node, qs->qs_conn_bm), "node %u\n", node);
273 set_bit(node, qs->qs_conn_bm);
275 mlog(0, "node %u, %d total\n", node, qs->qs_connected);
277 if (!test_bit(node, qs->qs_hb_bm))
278 o2quo_set_hold(qs, node);
280 o2quo_clear_hold(qs, node);
285 /* we've decided that we won't ever be connecting to the node again. if it's
287 * node stops heartbeating from hb_down or the caller decides that the node is
289 void o2quo_conn_err(u8 node)
295 if (test_bit(node, qs->qs_conn_bm)) {
298 "node %u, connected %d\n",
299 node, qs->qs_connected);
301 clear_bit(node, qs->qs_conn_bm);
303 if (test_bit(node, qs->qs_hb_bm))
304 o2quo_set_hold(qs, node);
307 mlog(0, "node %u, %d total\n", node, qs->qs_connected);