Lines Matching full:node

14  * that a node is broken and should be recovered.  They can't both recover each
19 * So we declare that a node which has given up on connecting to a majority
22 * There are huge opportunities for races here. After we give up on a node's
24 * to declare the node as truly dead. We also need to be careful with the
25 * race between when we see a node start heartbeating and when we connect
85 * go away as our node would be fenced externally before other nodes
117 mlog(ML_ERROR, "fencing this node because it is " in o2quo_make_decision()
128 * the lowest numbered node */ in o2quo_make_decision()
131 mlog(ML_ERROR, "fencing this node because it is " in o2quo_make_decision()
140 mlog(ML_ERROR, "fencing this node because it is " in o2quo_make_decision()
143 "node %u\n", quorum, qs->qs_heartbeating, in o2quo_make_decision()
154 mlog(ML_NOTICE, "not fencing this node, heartbeating: %d, " in o2quo_make_decision()
164 static void o2quo_set_hold(struct o2quo_state *qs, u8 node) in o2quo_set_hold() argument
168 if (!test_and_set_bit(node, qs->qs_hold_bm)) { in o2quo_set_hold()
171 "node %u\n", node); in o2quo_set_hold()
172 mlog(0, "node %u, %d total\n", node, qs->qs_holds); in o2quo_set_hold()
176 static void o2quo_clear_hold(struct o2quo_state *qs, u8 node) in o2quo_clear_hold() argument
180 if (test_and_clear_bit(node, qs->qs_hold_bm)) { in o2quo_clear_hold()
181 mlog(0, "node %u, %d total\n", node, qs->qs_holds - 1); in o2quo_clear_hold()
188 mlog_bug_on_msg(qs->qs_holds < 0, "node %u, holds %d\n", in o2quo_clear_hold()
189 node, qs->qs_holds); in o2quo_clear_hold()
193 /* as a node comes up we delay the quorum decision until we know the fate of
197 void o2quo_hb_up(u8 node) in o2quo_hb_up() argument
205 "node %u\n", node); in o2quo_hb_up()
206 mlog_bug_on_msg(test_bit(node, qs->qs_hb_bm), "node %u\n", node); in o2quo_hb_up()
207 set_bit(node, qs->qs_hb_bm); in o2quo_hb_up()
209 mlog(0, "node %u, %d total\n", node, qs->qs_heartbeating); in o2quo_hb_up()
211 if (!test_bit(node, qs->qs_conn_bm)) in o2quo_hb_up()
212 o2quo_set_hold(qs, node); in o2quo_hb_up()
214 o2quo_clear_hold(qs, node); in o2quo_hb_up()
219 /* hb going down releases any holds we might have had due to this node from
221 void o2quo_hb_down(u8 node) in o2quo_hb_down() argument
229 "node %u, %d heartbeating\n", in o2quo_hb_down()
230 node, qs->qs_heartbeating); in o2quo_hb_down()
231 mlog_bug_on_msg(!test_bit(node, qs->qs_hb_bm), "node %u\n", node); in o2quo_hb_down()
232 clear_bit(node, qs->qs_hb_bm); in o2quo_hb_down()
234 mlog(0, "node %u, %d total\n", node, qs->qs_heartbeating); in o2quo_hb_down()
236 o2quo_clear_hold(qs, node); in o2quo_hb_down()
241 /* this tells us that we've decided that the node is still heartbeating
246 void o2quo_hb_still_up(u8 node) in o2quo_hb_still_up() argument
252 mlog(0, "node %u\n", node); in o2quo_hb_still_up()
255 o2quo_clear_hold(qs, node); in o2quo_hb_still_up()
260 /* This is analogous to hb_up. as a node's connection comes up we delay the
265 void o2quo_conn_up(u8 node) in o2quo_conn_up() argument
273 "node %u\n", node); in o2quo_conn_up()
274 mlog_bug_on_msg(test_bit(node, qs->qs_conn_bm), "node %u\n", node); in o2quo_conn_up()
275 set_bit(node, qs->qs_conn_bm); in o2quo_conn_up()
277 mlog(0, "node %u, %d total\n", node, qs->qs_connected); in o2quo_conn_up()
279 if (!test_bit(node, qs->qs_hb_bm)) in o2quo_conn_up()
280 o2quo_set_hold(qs, node); in o2quo_conn_up()
282 o2quo_clear_hold(qs, node); in o2quo_conn_up()
287 /* we've decided that we won't ever be connecting to the node again. if it's
289 * node stops heartbeating from hb_down or the caller decides that the node is
291 void o2quo_conn_err(u8 node) in o2quo_conn_err() argument
297 if (test_bit(node, qs->qs_conn_bm)) { in o2quo_conn_err()
300 "node %u, connected %d\n", in o2quo_conn_err()
301 node, qs->qs_connected); in o2quo_conn_err()
303 clear_bit(node, qs->qs_conn_bm); in o2quo_conn_err()
305 if (test_bit(node, qs->qs_hb_bm)) in o2quo_conn_err()
306 o2quo_set_hold(qs, node); in o2quo_conn_err()
309 mlog(0, "node %u, %d total\n", node, qs->qs_connected); in o2quo_conn_err()