Lines Matching refs:slot
480 unsigned int slot; in o2hb_issue_node_write() local
485 slot = o2nm_this_node(); in o2hb_issue_node_write()
487 bio = o2hb_setup_one_bio(reg, write_wc, &slot, slot+1); in o2hb_issue_node_write()
550 struct o2hb_disk_slot *slot; in o2hb_check_own_slot() local
554 slot = ®->hr_slots[o2nm_this_node()]; in o2hb_check_own_slot()
556 if (!slot->ds_last_time) in o2hb_check_own_slot()
559 hb_block = slot->ds_raw_block; in o2hb_check_own_slot()
560 if (le64_to_cpu(hb_block->hb_seq) == slot->ds_last_time && in o2hb_check_own_slot()
561 le64_to_cpu(hb_block->hb_generation) == slot->ds_last_generation && in o2hb_check_own_slot()
562 hb_block->hb_node == slot->ds_node_num) in o2hb_check_own_slot()
569 if (hb_block->hb_node != slot->ds_node_num) in o2hb_check_own_slot()
572 slot->ds_last_generation) in o2hb_check_own_slot()
579 slot->ds_node_num, (unsigned long long)slot->ds_last_generation, in o2hb_check_own_slot()
580 (unsigned long long)slot->ds_last_time, hb_block->hb_node, in o2hb_check_own_slot()
592 struct o2hb_disk_slot *slot; in o2hb_prepare_block() local
596 slot = ®->hr_slots[node_num]; in o2hb_prepare_block()
598 hb_block = (struct o2hb_disk_heartbeat_block *)slot->ds_raw_block; in o2hb_prepare_block()
690 static void o2hb_shutdown_slot(struct o2hb_disk_slot *slot) in o2hb_shutdown_slot() argument
697 node = o2nm_get_node_by_num(slot->ds_node_num); in o2hb_shutdown_slot()
702 if (!list_empty(&slot->ds_live_item)) { in o2hb_shutdown_slot()
704 slot->ds_node_num); in o2hb_shutdown_slot()
706 list_del_init(&slot->ds_live_item); in o2hb_shutdown_slot()
708 if (list_empty(&o2hb_live_slots[slot->ds_node_num])) { in o2hb_shutdown_slot()
709 clear_bit(slot->ds_node_num, o2hb_live_node_bitmap); in o2hb_shutdown_slot()
712 slot->ds_node_num); in o2hb_shutdown_slot()
768 struct o2hb_disk_slot *slot) in o2hb_check_slot() argument
781 memcpy(hb_block, slot->ds_raw_block, reg->hr_block_bytes); in o2hb_check_slot()
787 node = o2nm_get_node_by_num(slot->ds_node_num); in o2hb_check_slot()
790 tmp = test_bit(slot->ds_node_num, o2hb_live_node_bitmap); in o2hb_check_slot()
804 if (list_empty(&slot->ds_live_item)) in o2hb_check_slot()
811 slot->ds_node_num, reg->hr_dev_name); in o2hb_check_slot()
814 slot->ds_equal_samples++; in o2hb_check_slot()
821 if (slot->ds_last_time != cputime) in o2hb_check_slot()
822 slot->ds_changed_samples++; in o2hb_check_slot()
824 slot->ds_equal_samples++; in o2hb_check_slot()
825 slot->ds_last_time = cputime; in o2hb_check_slot()
832 if (slot->ds_last_generation != le64_to_cpu(hb_block->hb_generation)) { in o2hb_check_slot()
834 slot->ds_equal_samples = 0; in o2hb_check_slot()
836 "to 0x%llx)\n", slot->ds_node_num, in o2hb_check_slot()
837 (long long)slot->ds_last_generation, in o2hb_check_slot()
841 slot->ds_last_generation = le64_to_cpu(hb_block->hb_generation); in o2hb_check_slot()
845 slot->ds_node_num, (long long)slot->ds_last_generation, in o2hb_check_slot()
848 (unsigned long long)slot->ds_last_time, slot->ds_changed_samples, in o2hb_check_slot()
849 slot->ds_equal_samples); in o2hb_check_slot()
856 if (list_empty(&slot->ds_live_item) && in o2hb_check_slot()
857 slot->ds_changed_samples >= O2HB_LIVE_THRESHOLD) { in o2hb_check_slot()
859 slot->ds_node_num, (long long)slot->ds_last_generation); in o2hb_check_slot()
861 set_bit(slot->ds_node_num, reg->hr_live_node_bitmap); in o2hb_check_slot()
864 if (list_empty(&o2hb_live_slots[slot->ds_node_num])) { in o2hb_check_slot()
866 "bitmap\n", slot->ds_node_num); in o2hb_check_slot()
867 set_bit(slot->ds_node_num, o2hb_live_node_bitmap); in o2hb_check_slot()
870 slot->ds_node_num); in o2hb_check_slot()
876 list_add_tail(&slot->ds_live_item, in o2hb_check_slot()
877 &o2hb_live_slots[slot->ds_node_num]); in o2hb_check_slot()
879 slot->ds_equal_samples = 0; in o2hb_check_slot()
894 slot->ds_node_num, reg->hr_dev_name, slot_dead_ms, in o2hb_check_slot()
901 if (list_empty(&slot->ds_live_item)) in o2hb_check_slot()
907 if (slot->ds_equal_samples >= o2hb_dead_threshold || gen_changed) { in o2hb_check_slot()
909 slot->ds_node_num); in o2hb_check_slot()
911 clear_bit(slot->ds_node_num, reg->hr_live_node_bitmap); in o2hb_check_slot()
914 list_del_init(&slot->ds_live_item); in o2hb_check_slot()
915 if (list_empty(&o2hb_live_slots[slot->ds_node_num])) { in o2hb_check_slot()
917 "nodes bitmap\n", slot->ds_node_num); in o2hb_check_slot()
918 clear_bit(slot->ds_node_num, o2hb_live_node_bitmap); in o2hb_check_slot()
922 node, slot->ds_node_num); in o2hb_check_slot()
931 slot->ds_changed_samples = 0; in o2hb_check_slot()
934 if (slot->ds_changed_samples) { in o2hb_check_slot()
935 slot->ds_changed_samples = 0; in o2hb_check_slot()
936 slot->ds_equal_samples = 0; in o2hb_check_slot()
1620 struct o2hb_disk_slot *slot; in o2hb_map_slot_data() local
1636 slot = ®->hr_slots[i]; in o2hb_map_slot_data()
1637 slot->ds_node_num = i; in o2hb_map_slot_data()
1638 INIT_LIST_HEAD(&slot->ds_live_item); in o2hb_map_slot_data()
1639 slot->ds_raw_block = NULL; in o2hb_map_slot_data()
1670 slot = ®->hr_slots[j + last_slot]; in o2hb_map_slot_data()
1671 slot->ds_raw_block = in o2hb_map_slot_data()
1687 struct o2hb_disk_slot *slot; in o2hb_populate_slot_data() local
1701 slot = ®->hr_slots[i]; in o2hb_populate_slot_data()
1702 hb_block = (struct o2hb_disk_heartbeat_block *) slot->ds_raw_block; in o2hb_populate_slot_data()
1706 slot->ds_last_time = le64_to_cpu(hb_block->hb_seq); in o2hb_populate_slot_data()
1707 slot->ds_last_generation = le64_to_cpu(hb_block->hb_generation); in o2hb_populate_slot_data()