Lines Matching refs:reco
121 if (dlm->reco.dead_node != dead_node) in dlm_set_reco_dead_node()
123 dlm->name, dlm->reco.dead_node, dead_node); in dlm_set_reco_dead_node()
124 dlm->reco.dead_node = dead_node; in dlm_set_reco_dead_node()
132 dlm->name, dlm->reco.new_master, master); in dlm_set_reco_master()
133 dlm->reco.new_master = master; in dlm_set_reco_master()
139 clear_bit(dlm->reco.dead_node, dlm->recovery_map); in __dlm_reset_recovery()
259 dlm->reco.state & DLM_RECO_STATE_ACTIVE ? "ACTIVE" : "inactive", in dlm_print_reco_node_status()
260 dlm->reco.dead_node, dlm->reco.new_master); in dlm_print_reco_node_status()
262 list_for_each_entry(ndata, &dlm->reco.node_data, list) { in dlm_print_reco_node_status()
293 list_for_each_entry(res, &dlm->reco.resources, recovering) { in dlm_print_reco_node_status()
334 ready = (dlm->reco.new_master != O2NM_INVALID_NODE_NUM); in dlm_reco_master_ready()
406 in_recovery = !!(dlm->reco.state & DLM_RECO_STATE_ACTIVE); in dlm_in_recovery()
418 dlm->reco.state, dlm->reco.new_master, in dlm_wait_for_recovery()
419 dlm->reco.dead_node); in dlm_wait_for_recovery()
421 wait_event(dlm->reco.event, !dlm_in_recovery(dlm)); in dlm_wait_for_recovery()
427 BUG_ON(dlm->reco.state & DLM_RECO_STATE_ACTIVE); in dlm_begin_recovery()
429 dlm->name, dlm->reco.dead_node); in dlm_begin_recovery()
430 dlm->reco.state |= DLM_RECO_STATE_ACTIVE; in dlm_begin_recovery()
437 BUG_ON(!(dlm->reco.state & DLM_RECO_STATE_ACTIVE)); in dlm_end_recovery()
438 dlm->reco.state &= ~DLM_RECO_STATE_ACTIVE; in dlm_end_recovery()
441 wake_up(&dlm->reco.event); in dlm_end_recovery()
447 "dead node %u in domain %s\n", dlm->reco.new_master, in dlm_print_recovery_master()
448 (dlm->node_num == dlm->reco.new_master ? "me" : "he"), in dlm_print_recovery_master()
449 dlm->reco.dead_node, dlm->name); in dlm_print_recovery_master()
460 if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM && in dlm_do_recovery()
461 test_bit(dlm->reco.new_master, dlm->recovery_map)) { in dlm_do_recovery()
463 dlm->reco.new_master, dlm->reco.dead_node); in dlm_do_recovery()
469 if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { in dlm_do_recovery()
477 } else if (!test_bit(dlm->reco.dead_node, dlm->recovery_map)) { in dlm_do_recovery()
480 dlm->reco.dead_node); in dlm_do_recovery()
484 if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { in dlm_do_recovery()
492 dlm->reco.dead_node); in dlm_do_recovery()
499 if (dlm->reco.new_master == dlm->node_num) in dlm_do_recovery()
502 if (dlm->reco.new_master == O2NM_INVALID_NODE_NUM) { in dlm_do_recovery()
528 status = dlm_remaster_locks(dlm, dlm->reco.dead_node); in dlm_do_recovery()
532 "retrying.\n", dlm->name, status, dlm->reco.dead_node); in dlm_do_recovery()
539 dlm->name, dlm->reco.dead_node, dlm->node_num); in dlm_do_recovery()
542 dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE; in dlm_do_recovery()
572 list_for_each_entry(ndata, &dlm->reco.node_data, list) { in dlm_remaster_locks()
659 list_for_each_entry(ndata, &dlm->reco.node_data, list) { in dlm_remaster_locks()
706 dlm->reco.state |= DLM_RECO_STATE_FINALIZE; in dlm_remaster_locks()
725 jiffies, dlm->reco.dead_node, in dlm_remaster_locks()
726 dlm->node_num, dlm->reco.new_master); in dlm_remaster_locks()
753 memcpy(dlm->reco.node_map, dlm->domain_map, sizeof(dlm->domain_map)); in dlm_init_recovery_area()
759 num = find_next_bit (dlm->reco.node_map, O2NM_MAX_NODES, num); in dlm_init_recovery_area()
773 list_add_tail(&ndata->list, &dlm->reco.node_data); in dlm_init_recovery_area()
787 list_splice_init(&dlm->reco.node_data, &tmplist); in dlm_destroy_recovery_area()
841 if (lr->dead_node != dlm->reco.dead_node) { in dlm_request_all_locks_handler()
844 lr->dead_node, dlm->reco.dead_node); in dlm_request_all_locks_handler()
850 BUG_ON(lr->dead_node != dlm->reco.dead_node); in dlm_request_all_locks_handler()
898 if (dead_node != dlm->reco.dead_node || in dlm_request_all_locks_worker()
899 reco_master != dlm->reco.new_master) { in dlm_request_all_locks_worker()
902 if (dlm->reco.new_master == O2NM_INVALID_NODE_NUM) { in dlm_request_all_locks_worker()
907 dlm->reco.dead_node, dlm->reco.new_master); in dlm_request_all_locks_worker()
911 dlm->name, dlm->reco.dead_node, in dlm_request_all_locks_worker()
912 dlm->reco.new_master, dead_node, reco_master); in dlm_request_all_locks_worker()
943 list_splice_init(&resources, &dlm->reco.resources); in dlm_request_all_locks_worker()
999 dlm->reco.dead_node, done->node_idx, dlm->node_num); in dlm_reco_data_done_handler()
1001 mlog_bug_on_msg((done->dead_node != dlm->reco.dead_node), in dlm_reco_data_done_handler()
1004 dlm->reco.dead_node, done->node_idx, dlm->node_num); in dlm_reco_data_done_handler()
1007 list_for_each_entry(ndata, &dlm->reco.node_data, list) { in dlm_reco_data_done_handler()
1059 list_for_each_entry_safe(res, next, &dlm->reco.resources, recovering) { in dlm_move_reco_locks_to_list()
2067 list_add_tail(&res->recovering, &dlm->reco.resources); in dlm_move_lockres_to_recovery_list()
2141 list_for_each_entry_safe(res, next, &dlm->reco.resources, recovering) { in dlm_finish_local_lockres_recovery()
2411 if (dlm->reco.new_master == idx) { in __dlm_hb_node_down()
2414 if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { in __dlm_hb_node_down()
2420 dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE; in __dlm_hb_node_down()
2543 dlm->name, jiffies, dlm->reco.dead_node, dlm->node_num); in dlm_pick_recovery_master()
2563 dlm->reco.new_master); in dlm_pick_recovery_master()
2570 if (dlm->reco.dead_node == O2NM_INVALID_NODE_NUM) { in dlm_pick_recovery_master()
2574 if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) { in dlm_pick_recovery_master()
2577 dlm->name, dlm->reco.new_master); in dlm_pick_recovery_master()
2589 dlm->reco.dead_node, dlm->node_num); in dlm_pick_recovery_master()
2591 dlm->reco.dead_node); in dlm_pick_recovery_master()
2633 dlm->name, dlm->reco.new_master, dlm->reco.dead_node); in dlm_pick_recovery_master()
2758 if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { in dlm_begin_reco_handler()
2762 dlm->reco.dead_node, dlm->reco.new_master); in dlm_begin_reco_handler()
2771 dlm->reco.dead_node, dlm->reco.new_master); in dlm_begin_reco_handler()
2776 if (dlm->reco.new_master != O2NM_INVALID_NODE_NUM) { in dlm_begin_reco_handler()
2777 if (test_bit(dlm->reco.new_master, dlm->recovery_map)) { in dlm_begin_reco_handler()
2779 "to %u\n", dlm->name, dlm->reco.new_master, in dlm_begin_reco_handler()
2783 "to %u\n", dlm->name, dlm->reco.new_master, in dlm_begin_reco_handler()
2788 if (dlm->reco.dead_node != O2NM_INVALID_NODE_NUM) { in dlm_begin_reco_handler()
2791 dlm->reco.dead_node, br->node_idx, br->dead_node); in dlm_begin_reco_handler()
2816 dlm->reco.dead_node, dlm->reco.new_master); in dlm_begin_reco_handler()
2833 "stage %d\n", dlm->name, dlm->reco.dead_node, stage); in dlm_send_finalize_reco_message()
2842 fr.dead_node = dlm->reco.dead_node; in dlm_send_finalize_reco_message()
2895 fr->dead_node, dlm->reco.dead_node, dlm->reco.new_master); in dlm_finalize_reco_handler()
2899 if (dlm->reco.new_master != fr->node_idx) { in dlm_finalize_reco_handler()
2902 fr->node_idx, dlm->reco.new_master, fr->dead_node); in dlm_finalize_reco_handler()
2905 if (dlm->reco.dead_node != fr->dead_node) { in dlm_finalize_reco_handler()
2908 fr->node_idx, fr->dead_node, dlm->reco.dead_node); in dlm_finalize_reco_handler()
2915 if (dlm->reco.state & DLM_RECO_STATE_FINALIZE) { in dlm_finalize_reco_handler()
2923 dlm->reco.state |= DLM_RECO_STATE_FINALIZE; in dlm_finalize_reco_handler()
2927 if (!(dlm->reco.state & DLM_RECO_STATE_FINALIZE)) { in dlm_finalize_reco_handler()
2935 dlm->reco.state &= ~DLM_RECO_STATE_FINALIZE; in dlm_finalize_reco_handler()
2945 dlm->name, fr->node_idx, dlm->reco.dead_node, dlm->reco.new_master); in dlm_finalize_reco_handler()