Lines Matching refs:head
83 struct spdk_gpt_header *head = gpt->header; in gpt_read_partitions() local
86 num_partition_entries = from_le32(&head->num_partition_entries); in gpt_read_partitions()
93 partition_entry_size = from_le32(&head->size_of_partition_entry); in gpt_read_partitions()
101 partition_start_lba = from_le64(&head->partition_entry_lba); in gpt_read_partitions()
112 if (crc32 != from_le32(&head->partition_entry_array_crc32)) { in gpt_read_partitions()
121 gpt_lba_range_check(struct spdk_gpt_header *head, uint64_t lba_end) in gpt_lba_range_check() argument
125 usable_lba_start = from_le64(&head->first_usable_lba); in gpt_lba_range_check()
126 usable_lba_end = from_le64(&head->last_usable_lba); in gpt_lba_range_check()
155 struct spdk_gpt_header *head; in gpt_read_header() local
157 head = gpt_get_header_buf(gpt); in gpt_read_header()
158 if (!head) { in gpt_read_header()
163 head_size = from_le32(&head->header_size); in gpt_read_header()
164 if (head_size < sizeof(*head) || head_size > gpt->sector_size) { in gpt_read_header()
169 original_crc = from_le32(&head->header_crc32); in gpt_read_header()
170 head->header_crc32 = 0; in gpt_read_header()
171 new_crc = spdk_crc32_ieee_update(head, from_le32(&head->header_size), ~0); in gpt_read_header()
174 to_le32(&head->header_crc32, original_crc); in gpt_read_header()
182 if (memcmp(SPDK_GPT_SIGNATURE, head->gpt_signature, in gpt_read_header()
183 sizeof(head->gpt_signature))) { in gpt_read_header()
189 my_lba = from_le64(&head->my_lba); in gpt_read_header()
196 if (gpt_lba_range_check(head, gpt->lba_end)) { in gpt_read_header()
201 gpt->header = head; in gpt_read_header()