Lines Matching full: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 " in o2quo_make_decision()
126 * the lowest numbered node */ in o2quo_make_decision()
129 mlog(ML_ERROR, "fencing this node because it is " in o2quo_make_decision()
138 mlog(ML_ERROR, "fencing this node because it is " in o2quo_make_decision()
141 "node %u\n", quorum, qs->qs_heartbeating, in o2quo_make_decision()
152 mlog(ML_NOTICE, "not fencing this node, heartbeating: %d, " in o2quo_make_decision()
162 static void o2quo_set_hold(struct o2quo_state *qs, u8 node) in o2quo_set_hold() argument
166 if (!test_and_set_bit(node, qs->qs_hold_bm)) { in o2quo_set_hold()
169 "node %u\n", node); in o2quo_set_hold()
170 mlog(0, "node %u, %d total\n", node, qs->qs_holds); in o2quo_set_hold()
174 static void o2quo_clear_hold(struct o2quo_state *qs, u8 node) in o2quo_clear_hold() argument
178 if (test_and_clear_bit(node, qs->qs_hold_bm)) { in o2quo_clear_hold()
179 mlog(0, "node %u, %d total\n", node, qs->qs_holds - 1); in o2quo_clear_hold()
186 mlog_bug_on_msg(qs->qs_holds < 0, "node %u, holds %d\n", in o2quo_clear_hold()
187 node, qs->qs_holds); in o2quo_clear_hold()
191 /* as a node comes up we delay the quorum decision until we know the fate of
195 void o2quo_hb_up(u8 node) in o2quo_hb_up() argument
203 "node %u\n", node); in o2quo_hb_up()
204 mlog_bug_on_msg(test_bit(node, qs->qs_hb_bm), "node %u\n", node); in o2quo_hb_up()
205 set_bit(node, qs->qs_hb_bm); in o2quo_hb_up()
207 mlog(0, "node %u, %d total\n", node, qs->qs_heartbeating); in o2quo_hb_up()
209 if (!test_bit(node, qs->qs_conn_bm)) in o2quo_hb_up()
210 o2quo_set_hold(qs, node); in o2quo_hb_up()
212 o2quo_clear_hold(qs, node); in o2quo_hb_up()
217 /* hb going down releases any holds we might have had due to this node from
219 void o2quo_hb_down(u8 node) in o2quo_hb_down() argument
227 "node %u, %d heartbeating\n", in o2quo_hb_down()
228 node, qs->qs_heartbeating); in o2quo_hb_down()
229 mlog_bug_on_msg(!test_bit(node, qs->qs_hb_bm), "node %u\n", node); in o2quo_hb_down()
230 clear_bit(node, qs->qs_hb_bm); in o2quo_hb_down()
232 mlog(0, "node %u, %d total\n", node, qs->qs_heartbeating); in o2quo_hb_down()
234 o2quo_clear_hold(qs, node); in o2quo_hb_down()
239 /* this tells us that we've decided that the node is still heartbeating
244 void o2quo_hb_still_up(u8 node) in o2quo_hb_still_up() argument
250 mlog(0, "node %u\n", node); in o2quo_hb_still_up()
253 o2quo_clear_hold(qs, node); in o2quo_hb_still_up()
258 /* This is analogous to hb_up. as a node's connection comes up we delay the
263 void o2quo_conn_up(u8 node) in o2quo_conn_up() argument
271 "node %u\n", node); in o2quo_conn_up()
272 mlog_bug_on_msg(test_bit(node, qs->qs_conn_bm), "node %u\n", node); in o2quo_conn_up()
273 set_bit(node, qs->qs_conn_bm); in o2quo_conn_up()
275 mlog(0, "node %u, %d total\n", node, qs->qs_connected); in o2quo_conn_up()
277 if (!test_bit(node, qs->qs_hb_bm)) in o2quo_conn_up()
278 o2quo_set_hold(qs, node); in o2quo_conn_up()
280 o2quo_clear_hold(qs, node); in o2quo_conn_up()
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) in o2quo_conn_err() argument
295 if (test_bit(node, qs->qs_conn_bm)) { in o2quo_conn_err()
298 "node %u, connected %d\n", in o2quo_conn_err()
299 node, qs->qs_connected); in o2quo_conn_err()
301 clear_bit(node, qs->qs_conn_bm); in o2quo_conn_err()
303 if (test_bit(node, qs->qs_hb_bm)) in o2quo_conn_err()
304 o2quo_set_hold(qs, node); in o2quo_conn_err()
307 mlog(0, "node %u, %d total\n", node, qs->qs_connected); in o2quo_conn_err()