Lines Matching defs:hb_block

615 				     struct o2hb_disk_heartbeat_block *hb_block)
623 old_cksum = hb_block->hb_cksum;
624 hb_block->hb_cksum = 0;
626 ret = crc32_le(0, (unsigned char *) hb_block, reg->hr_block_bytes);
628 hb_block->hb_cksum = old_cksum;
633 static void o2hb_dump_slot(struct o2hb_disk_heartbeat_block *hb_block)
637 (long long)le64_to_cpu(hb_block->hb_seq),
638 hb_block->hb_node, le32_to_cpu(hb_block->hb_cksum),
639 (long long)le64_to_cpu(hb_block->hb_generation));
643 struct o2hb_disk_heartbeat_block *hb_block)
647 read = le32_to_cpu(hb_block->hb_cksum);
648 computed = o2hb_compute_block_crc_le(reg, hb_block);
663 struct o2hb_disk_heartbeat_block *hb_block;
671 hb_block = slot->ds_raw_block;
672 if (le64_to_cpu(hb_block->hb_seq) == slot->ds_last_time &&
673 le64_to_cpu(hb_block->hb_generation) == slot->ds_last_generation &&
674 hb_block->hb_node == slot->ds_node_num)
681 if (hb_block->hb_node != slot->ds_node_num)
683 else if (le64_to_cpu(hb_block->hb_generation) !=
692 (unsigned long long)slot->ds_last_time, hb_block->hb_node,
693 (unsigned long long)le64_to_cpu(hb_block->hb_generation),
694 (unsigned long long)le64_to_cpu(hb_block->hb_seq));
705 struct o2hb_disk_heartbeat_block *hb_block;
710 hb_block = (struct o2hb_disk_heartbeat_block *)slot->ds_raw_block;
711 memset(hb_block, 0, reg->hr_block_bytes);
717 hb_block->hb_seq = cpu_to_le64(cputime);
718 hb_block->hb_node = node_num;
719 hb_block->hb_generation = cpu_to_le64(generation);
720 hb_block->hb_dead_ms = cpu_to_le32(o2hb_dead_threshold * O2HB_REGION_TIMEOUT_MS);
723 hb_block->hb_cksum = cpu_to_le32(o2hb_compute_block_crc_le(reg,
724 hb_block));
728 le32_to_cpu(hb_block->hb_cksum));
886 struct o2hb_disk_heartbeat_block *hb_block = reg->hr_tmp_block;
893 memcpy(hb_block, slot->ds_raw_block, reg->hr_block_bytes);
908 if (!o2hb_verify_crc(reg, hb_block)) {
924 o2hb_dump_slot(hb_block);
932 cputime = le64_to_cpu(hb_block->hb_seq);
944 if (slot->ds_last_generation != le64_to_cpu(hb_block->hb_generation)) {
950 (long long)le64_to_cpu(hb_block->hb_generation));
953 slot->ds_last_generation = le64_to_cpu(hb_block->hb_generation);
958 le32_to_cpu(hb_block->hb_cksum),
959 (unsigned long long)le64_to_cpu(hb_block->hb_seq),
999 slot_dead_ms = le32_to_cpu(hb_block->hb_dead_ms);
1724 struct o2hb_disk_heartbeat_block *hb_block;
1736 hb_block = (struct o2hb_disk_heartbeat_block *) slot->ds_raw_block;
1740 slot->ds_last_time = le64_to_cpu(hb_block->hb_seq);
1741 slot->ds_last_generation = le64_to_cpu(hb_block->hb_generation);