Lines Matching refs:reco
104 if (dlm->reco.dead_node != dead_node) in dlm_set_reco_dead_node()
106 dlm->name, dlm->reco.dead_node, dead_node); in dlm_set_reco_dead_node()
107 dlm->reco.dead_node = dead_node; in dlm_set_reco_dead_node()
115 dlm->name, dlm->reco.new_master, master); in dlm_set_reco_master()
116 dlm->reco.new_master = master; in dlm_set_reco_master()
122 clear_bit(dlm->reco.dead_node, dlm->recovery_map); in __dlm_reset_recovery()
235 dlm->reco.state & DLM_RECO_STATE_ACTIVE ? "ACTIVE" : "inactive", in dlm_print_reco_node_status()
236 dlm->reco.dead_node, dlm->reco.new_master); in dlm_print_reco_node_status()
238 list_for_each_entry(ndata, &dlm->reco.node_data, list) { in dlm_print_reco_node_status()
269 list_for_each_entry(res, &dlm->reco.resources, recovering) { in dlm_print_reco_node_status()
310 ready = (dlm->reco.new_master != O2NM_INVALID_NODE_NUM); in dlm_reco_master_ready()
382 in_recovery = !!(dlm->reco.state & DLM_RECO_STATE_ACTIVE); in dlm_in_recovery()
394 dlm->reco.state, dlm->reco.new_master, in dlm_wait_for_recovery()
395 dlm->reco.dead_node); in dlm_wait_for_recovery()
397 wait_event(dlm->reco.event, !dlm_in_recovery(dlm)); in dlm_wait_for_recovery()
403 BUG_ON(dlm->reco.state & DLM_RECO_STATE_ACTIVE); in dlm_begin_recovery()
405 dlm->name, dlm->reco.dead_node); in dlm_begin_recovery()
406 dlm->reco.state |= DLM_RECO_STATE_ACTIVE; in dlm_begin_recovery()
412 BUG_ON(!(dlm->reco.state & DLM_RECO_STATE_ACTIVE)); in dlm_end_recovery()
413 dlm->reco.state &= ~DLM_RECO_STATE_ACTIVE; in dlm_end_recovery()
416 wake_up(&dlm->reco.event); in dlm_end_recovery()
422 "dead node %u in domain %s\n", dlm->reco.new_master, in dlm_print_recovery_master()
423 (dlm->node_num == dlm->reco.new_master ? "me" : "he"), in dlm_print_recovery_master()
424 dlm->reco.dead_node, dlm->name); in dlm_print_recovery_master()
442 if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM && in dlm_do_recovery()
443 test_bit(dlm->reco.new_master, dlm->recovery_map)) { in dlm_do_recovery()
445 dlm->reco.new_master, dlm->reco.dead_node); in dlm_do_recovery()
451 if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { in dlm_do_recovery()
459 } else if (!test_bit(dlm->reco.dead_node, dlm->recovery_map)) { in dlm_do_recovery()
462 dlm->reco.dead_node); in dlm_do_recovery()
466 if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { in dlm_do_recovery()
474 dlm->reco.dead_node); in dlm_do_recovery()
482 if (dlm->reco.new_master == dlm->node_num) in dlm_do_recovery()
485 if (dlm->reco.new_master == O2NM_INVALID_NODE_NUM) { in dlm_do_recovery()
511 status = dlm_remaster_locks(dlm, dlm->reco.dead_node); in dlm_do_recovery()
515 "retrying.\n", dlm->name, status, dlm->reco.dead_node); in dlm_do_recovery()
522 dlm->name, dlm->reco.dead_node, dlm->node_num); in dlm_do_recovery()
525 dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE; in dlm_do_recovery()
555 list_for_each_entry(ndata, &dlm->reco.node_data, list) { in dlm_remaster_locks()
642 list_for_each_entry(ndata, &dlm->reco.node_data, list) { in dlm_remaster_locks()
689 dlm->reco.state |= DLM_RECO_STATE_FINALIZE; in dlm_remaster_locks()
708 jiffies, dlm->reco.dead_node, in dlm_remaster_locks()
709 dlm->node_num, dlm->reco.new_master); in dlm_remaster_locks()
736 memcpy(dlm->reco.node_map, dlm->domain_map, sizeof(dlm->domain_map)); in dlm_init_recovery_area()
742 num = find_next_bit (dlm->reco.node_map, O2NM_MAX_NODES, num); in dlm_init_recovery_area()
756 list_add_tail(&ndata->list, &dlm->reco.node_data); in dlm_init_recovery_area()
770 list_splice_init(&dlm->reco.node_data, &tmplist); in dlm_destroy_recovery_area()
824 if (lr->dead_node != dlm->reco.dead_node) { in dlm_request_all_locks_handler()
827 lr->dead_node, dlm->reco.dead_node); in dlm_request_all_locks_handler()
833 BUG_ON(lr->dead_node != dlm->reco.dead_node); in dlm_request_all_locks_handler()
881 if (dead_node != dlm->reco.dead_node || in dlm_request_all_locks_worker()
882 reco_master != dlm->reco.new_master) { in dlm_request_all_locks_worker()
885 if (dlm->reco.new_master == O2NM_INVALID_NODE_NUM) { in dlm_request_all_locks_worker()
890 dlm->reco.dead_node, dlm->reco.new_master); in dlm_request_all_locks_worker()
894 dlm->name, dlm->reco.dead_node, in dlm_request_all_locks_worker()
895 dlm->reco.new_master, dead_node, reco_master); in dlm_request_all_locks_worker()
926 list_splice_init(&resources, &dlm->reco.resources); in dlm_request_all_locks_worker()
982 dlm->reco.dead_node, done->node_idx, dlm->node_num); in dlm_reco_data_done_handler()
984 mlog_bug_on_msg((done->dead_node != dlm->reco.dead_node), in dlm_reco_data_done_handler()
987 dlm->reco.dead_node, done->node_idx, dlm->node_num); in dlm_reco_data_done_handler()
990 list_for_each_entry(ndata, &dlm->reco.node_data, list) { in dlm_reco_data_done_handler()
1042 list_for_each_entry_safe(res, next, &dlm->reco.resources, recovering) { in dlm_move_reco_locks_to_list()
2063 list_add_tail(&res->recovering, &dlm->reco.resources); in dlm_move_lockres_to_recovery_list()
2137 list_for_each_entry_safe(res, next, &dlm->reco.resources, recovering) { in dlm_finish_local_lockres_recovery()
2424 if (dlm->reco.new_master == idx) { in __dlm_hb_node_down()
2427 if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { in __dlm_hb_node_down()
2433 dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE; in __dlm_hb_node_down()
2552 dlm->name, jiffies, dlm->reco.dead_node, dlm->node_num); in dlm_pick_recovery_master()
2572 dlm->reco.new_master); in dlm_pick_recovery_master()
2579 if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { in dlm_pick_recovery_master()
2583 if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) { in dlm_pick_recovery_master()
2586 dlm->name, dlm->reco.new_master); in dlm_pick_recovery_master()
2598 dlm->reco.dead_node, dlm->node_num); in dlm_pick_recovery_master()
2600 dlm->reco.dead_node); in dlm_pick_recovery_master()
2642 dlm->name, dlm->reco.new_master, dlm->reco.dead_node); in dlm_pick_recovery_master()
2766 if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { in dlm_begin_reco_handler()
2770 dlm->reco.dead_node, dlm->reco.new_master); in dlm_begin_reco_handler()
2779 dlm->reco.dead_node, dlm->reco.new_master); in dlm_begin_reco_handler()
2784 if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) { in dlm_begin_reco_handler()
2785 if (test_bit(dlm->reco.new_master, dlm->recovery_map)) { in dlm_begin_reco_handler()
2787 "to %u\n", dlm->name, dlm->reco.new_master, in dlm_begin_reco_handler()
2791 "to %u\n", dlm->name, dlm->reco.new_master, in dlm_begin_reco_handler()
2796 if (dlm->reco.dead_node != O2NM_INVALID_NODE_NUM) { in dlm_begin_reco_handler()
2799 dlm->reco.dead_node, br->node_idx, br->dead_node); in dlm_begin_reco_handler()
2824 dlm->reco.dead_node, dlm->reco.new_master); in dlm_begin_reco_handler()
2841 "stage %d\n", dlm->name, dlm->reco.dead_node, stage); in dlm_send_finalize_reco_message()
2850 fr.dead_node = dlm->reco.dead_node; in dlm_send_finalize_reco_message()
2903 fr->dead_node, dlm->reco.dead_node, dlm->reco.new_master); in dlm_finalize_reco_handler()
2907 if (dlm->reco.new_master != fr->node_idx) { in dlm_finalize_reco_handler()
2910 fr->node_idx, dlm->reco.new_master, fr->dead_node); in dlm_finalize_reco_handler()
2913 if (dlm->reco.dead_node != fr->dead_node) { in dlm_finalize_reco_handler()
2916 fr->node_idx, fr->dead_node, dlm->reco.dead_node); in dlm_finalize_reco_handler()
2923 if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { in dlm_finalize_reco_handler()
2931 dlm->reco.state |= DLM_RECO_STATE_FINALIZE; in dlm_finalize_reco_handler()
2935 if (!(dlm->reco.state & DLM_RECO_STATE_FINALIZE)) { in dlm_finalize_reco_handler()
2943 dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE; in dlm_finalize_reco_handler()
2951 dlm->name, fr->node_idx, dlm->reco.dead_node, dlm->reco.new_master); in dlm_finalize_reco_handler()