Lines Matching refs:hb_block

620 				     struct o2hb_disk_heartbeat_block *hb_block)  in o2hb_compute_block_crc_le()  argument
628 old_cksum = hb_block->hb_cksum; in o2hb_compute_block_crc_le()
629 hb_block->hb_cksum = 0; in o2hb_compute_block_crc_le()
631 ret = crc32_le(0, (unsigned char *) hb_block, reg->hr_block_bytes); in o2hb_compute_block_crc_le()
633 hb_block->hb_cksum = old_cksum; in o2hb_compute_block_crc_le()
638 static void o2hb_dump_slot(struct o2hb_disk_heartbeat_block *hb_block) in o2hb_dump_slot() argument
642 (long long)le64_to_cpu(hb_block->hb_seq), in o2hb_dump_slot()
643 hb_block->hb_node, le32_to_cpu(hb_block->hb_cksum), in o2hb_dump_slot()
644 (long long)le64_to_cpu(hb_block->hb_generation)); in o2hb_dump_slot()
648 struct o2hb_disk_heartbeat_block *hb_block) in o2hb_verify_crc() argument
652 read = le32_to_cpu(hb_block->hb_cksum); in o2hb_verify_crc()
653 computed = o2hb_compute_block_crc_le(reg, hb_block); in o2hb_verify_crc()
668 struct o2hb_disk_heartbeat_block *hb_block; in o2hb_check_own_slot() local
676 hb_block = slot->ds_raw_block; in o2hb_check_own_slot()
677 if (le64_to_cpu(hb_block->hb_seq) == slot->ds_last_time && in o2hb_check_own_slot()
678 le64_to_cpu(hb_block->hb_generation) == slot->ds_last_generation && in o2hb_check_own_slot()
679 hb_block->hb_node == slot->ds_node_num) in o2hb_check_own_slot()
686 if (hb_block->hb_node != slot->ds_node_num) in o2hb_check_own_slot()
688 else if (le64_to_cpu(hb_block->hb_generation) != in o2hb_check_own_slot()
697 (unsigned long long)slot->ds_last_time, hb_block->hb_node, in o2hb_check_own_slot()
698 (unsigned long long)le64_to_cpu(hb_block->hb_generation), in o2hb_check_own_slot()
699 (unsigned long long)le64_to_cpu(hb_block->hb_seq)); in o2hb_check_own_slot()
710 struct o2hb_disk_heartbeat_block *hb_block; in o2hb_prepare_block() local
715 hb_block = (struct o2hb_disk_heartbeat_block *)slot->ds_raw_block; in o2hb_prepare_block()
716 memset(hb_block, 0, reg->hr_block_bytes); in o2hb_prepare_block()
722 hb_block->hb_seq = cpu_to_le64(cputime); in o2hb_prepare_block()
723 hb_block->hb_node = node_num; in o2hb_prepare_block()
724 hb_block->hb_generation = cpu_to_le64(generation); in o2hb_prepare_block()
725 hb_block->hb_dead_ms = cpu_to_le32(o2hb_dead_threshold * O2HB_REGION_TIMEOUT_MS); in o2hb_prepare_block()
728 hb_block->hb_cksum = cpu_to_le32(o2hb_compute_block_crc_le(reg, in o2hb_prepare_block()
729 hb_block)); in o2hb_prepare_block()
733 le32_to_cpu(hb_block->hb_cksum)); in o2hb_prepare_block()
891 struct o2hb_disk_heartbeat_block *hb_block = reg->hr_tmp_block; in o2hb_check_slot() local
898 memcpy(hb_block, slot->ds_raw_block, reg->hr_block_bytes); in o2hb_check_slot()
913 if (!o2hb_verify_crc(reg, hb_block)) { in o2hb_check_slot()
929 o2hb_dump_slot(hb_block); in o2hb_check_slot()
937 cputime = le64_to_cpu(hb_block->hb_seq); in o2hb_check_slot()
949 if (slot->ds_last_generation != le64_to_cpu(hb_block->hb_generation)) { in o2hb_check_slot()
955 (long long)le64_to_cpu(hb_block->hb_generation)); in o2hb_check_slot()
958 slot->ds_last_generation = le64_to_cpu(hb_block->hb_generation); in o2hb_check_slot()
963 le32_to_cpu(hb_block->hb_cksum), in o2hb_check_slot()
964 (unsigned long long)le64_to_cpu(hb_block->hb_seq), in o2hb_check_slot()
1004 slot_dead_ms = le32_to_cpu(hb_block->hb_dead_ms); in o2hb_check_slot()
1731 struct o2hb_disk_heartbeat_block *hb_block; in o2hb_populate_slot_data() local
1743 hb_block = (struct o2hb_disk_heartbeat_block *) slot->ds_raw_block; in o2hb_populate_slot_data()
1747 slot->ds_last_time = le64_to_cpu(hb_block->hb_seq); in o2hb_populate_slot_data()
1748 slot->ds_last_generation = le64_to_cpu(hb_block->hb_generation); in o2hb_populate_slot_data()