Lines Matching refs:slot
591 unsigned int slot; in o2hb_issue_node_write() local
596 slot = o2nm_this_node(); in o2hb_issue_node_write()
598 bio = o2hb_setup_one_bio(reg, write_wc, &slot, slot+1, in o2hb_issue_node_write()
662 struct o2hb_disk_slot *slot; in o2hb_check_own_slot() local
666 slot = ®->hr_slots[o2nm_this_node()]; in o2hb_check_own_slot()
668 if (!slot->ds_last_time) in o2hb_check_own_slot()
671 hb_block = slot->ds_raw_block; in o2hb_check_own_slot()
672 if (le64_to_cpu(hb_block->hb_seq) == slot->ds_last_time && in o2hb_check_own_slot()
673 le64_to_cpu(hb_block->hb_generation) == slot->ds_last_generation && in o2hb_check_own_slot()
674 hb_block->hb_node == slot->ds_node_num) in o2hb_check_own_slot()
681 if (hb_block->hb_node != slot->ds_node_num) in o2hb_check_own_slot()
684 slot->ds_last_generation) in o2hb_check_own_slot()
691 slot->ds_node_num, (unsigned long long)slot->ds_last_generation, in o2hb_check_own_slot()
692 (unsigned long long)slot->ds_last_time, hb_block->hb_node, in o2hb_check_own_slot()
704 struct o2hb_disk_slot *slot; in o2hb_prepare_block() local
708 slot = ®->hr_slots[node_num]; in o2hb_prepare_block()
710 hb_block = (struct o2hb_disk_heartbeat_block *)slot->ds_raw_block; in o2hb_prepare_block()
802 static void o2hb_shutdown_slot(struct o2hb_disk_slot *slot) in o2hb_shutdown_slot() argument
809 node = o2nm_get_node_by_num(slot->ds_node_num); in o2hb_shutdown_slot()
814 if (!list_empty(&slot->ds_live_item)) { in o2hb_shutdown_slot()
816 slot->ds_node_num); in o2hb_shutdown_slot()
818 list_del_init(&slot->ds_live_item); in o2hb_shutdown_slot()
820 if (list_empty(&o2hb_live_slots[slot->ds_node_num])) { in o2hb_shutdown_slot()
821 clear_bit(slot->ds_node_num, o2hb_live_node_bitmap); in o2hb_shutdown_slot()
824 slot->ds_node_num); in o2hb_shutdown_slot()
880 struct o2hb_disk_slot *slot) in o2hb_check_slot() argument
893 memcpy(hb_block, slot->ds_raw_block, reg->hr_block_bytes); in o2hb_check_slot()
899 node = o2nm_get_node_by_num(slot->ds_node_num); in o2hb_check_slot()
902 tmp = test_bit(slot->ds_node_num, o2hb_live_node_bitmap); in o2hb_check_slot()
916 if (list_empty(&slot->ds_live_item)) in o2hb_check_slot()
923 slot->ds_node_num, reg->hr_bdev); in o2hb_check_slot()
926 slot->ds_equal_samples++; in o2hb_check_slot()
933 if (slot->ds_last_time != cputime) in o2hb_check_slot()
934 slot->ds_changed_samples++; in o2hb_check_slot()
936 slot->ds_equal_samples++; in o2hb_check_slot()
937 slot->ds_last_time = cputime; in o2hb_check_slot()
944 if (slot->ds_last_generation != le64_to_cpu(hb_block->hb_generation)) { in o2hb_check_slot()
946 slot->ds_equal_samples = 0; in o2hb_check_slot()
948 "to 0x%llx)\n", slot->ds_node_num, in o2hb_check_slot()
949 (long long)slot->ds_last_generation, in o2hb_check_slot()
953 slot->ds_last_generation = le64_to_cpu(hb_block->hb_generation); in o2hb_check_slot()
957 slot->ds_node_num, (long long)slot->ds_last_generation, in o2hb_check_slot()
960 (unsigned long long)slot->ds_last_time, slot->ds_changed_samples, in o2hb_check_slot()
961 slot->ds_equal_samples); in o2hb_check_slot()
968 if (list_empty(&slot->ds_live_item) && in o2hb_check_slot()
969 slot->ds_changed_samples >= O2HB_LIVE_THRESHOLD) { in o2hb_check_slot()
971 slot->ds_node_num, (long long)slot->ds_last_generation); in o2hb_check_slot()
973 set_bit(slot->ds_node_num, reg->hr_live_node_bitmap); in o2hb_check_slot()
976 if (list_empty(&o2hb_live_slots[slot->ds_node_num])) { in o2hb_check_slot()
978 "bitmap\n", slot->ds_node_num); in o2hb_check_slot()
979 set_bit(slot->ds_node_num, o2hb_live_node_bitmap); in o2hb_check_slot()
982 slot->ds_node_num); in o2hb_check_slot()
988 list_add_tail(&slot->ds_live_item, in o2hb_check_slot()
989 &o2hb_live_slots[slot->ds_node_num]); in o2hb_check_slot()
991 slot->ds_equal_samples = 0; in o2hb_check_slot()
1006 slot->ds_node_num, reg->hr_bdev, slot_dead_ms, in o2hb_check_slot()
1013 if (list_empty(&slot->ds_live_item)) in o2hb_check_slot()
1019 if (slot->ds_equal_samples >= o2hb_dead_threshold || gen_changed) { in o2hb_check_slot()
1021 slot->ds_node_num); in o2hb_check_slot()
1023 clear_bit(slot->ds_node_num, reg->hr_live_node_bitmap); in o2hb_check_slot()
1026 list_del_init(&slot->ds_live_item); in o2hb_check_slot()
1027 if (list_empty(&o2hb_live_slots[slot->ds_node_num])) { in o2hb_check_slot()
1029 "nodes bitmap\n", slot->ds_node_num); in o2hb_check_slot()
1030 clear_bit(slot->ds_node_num, o2hb_live_node_bitmap); in o2hb_check_slot()
1034 node, slot->ds_node_num); in o2hb_check_slot()
1043 slot->ds_changed_samples = 0; in o2hb_check_slot()
1046 if (slot->ds_changed_samples) { in o2hb_check_slot()
1047 slot->ds_changed_samples = 0; in o2hb_check_slot()
1048 slot->ds_equal_samples = 0; in o2hb_check_slot()
1666 struct o2hb_disk_slot *slot; in o2hb_map_slot_data() local
1678 slot = ®->hr_slots[i]; in o2hb_map_slot_data()
1679 slot->ds_node_num = i; in o2hb_map_slot_data()
1680 INIT_LIST_HEAD(&slot->ds_live_item); in o2hb_map_slot_data()
1681 slot->ds_raw_block = NULL; in o2hb_map_slot_data()
1708 slot = ®->hr_slots[j + last_slot]; in o2hb_map_slot_data()
1709 slot->ds_raw_block = in o2hb_map_slot_data()
1725 struct o2hb_disk_slot *slot; in o2hb_populate_slot_data() local
1737 slot = ®->hr_slots[i]; in o2hb_populate_slot_data()
1738 hb_block = (struct o2hb_disk_heartbeat_block *) slot->ds_raw_block; in o2hb_populate_slot_data()
1742 slot->ds_last_time = le64_to_cpu(hb_block->hb_seq); in o2hb_populate_slot_data()
1743 slot->ds_last_generation = le64_to_cpu(hb_block->hb_generation); in o2hb_populate_slot_data()