Lines Matching refs:list_count

122 	u32 list_count;  member
139 u16 list_count; member
227 (zone->list_count + 2) * sizeof(struct delta_list)); in uds_reset_delta_index()
231 delta_lists[zone->list_count + 1].start = list_bits; in uds_reset_delta_index()
232 delta_lists[zone->list_count + 1].size = GUARD_BITS; in uds_reset_delta_index()
237 spacing = list_bits / zone->list_count; in uds_reset_delta_index()
239 for (i = 1; i <= zone->list_count; i++) { in uds_reset_delta_index()
309 u32 first_list, u32 list_count, u32 mean_delta, in initialize_delta_zone() argument
318 result = vdo_allocate(list_count + 2, u64, "delta list temp", in initialize_delta_zone()
324 result = vdo_allocate(list_count + 2, struct delta_list, "delta lists", in initialize_delta_zone()
341 delta_zone->list_count = list_count; in initialize_delta_zone()
348 u32 list_count, u32 mean_delta, u32 payload_bits, in uds_initialize_delta_index() argument
361 delta_index->list_count = list_count; in uds_initialize_delta_index()
362 delta_index->lists_per_zone = DIV_ROUND_UP(list_count, zone_count); in uds_initialize_delta_index()
376 if (delta_index->list_count <= first_list_in_zone) { in uds_initialize_delta_index()
380 list_count, zone_count); in uds_initialize_delta_index()
382 lists_in_zone = delta_index->list_count - first_list_in_zone; in uds_initialize_delta_index()
444 static bool verify_delta_index_page(u64 nonce, u16 list_count, u64 expected_nonce, in verify_delta_index_page() argument
457 if (list_count > ((memory_size - sizeof(struct delta_page_header)) * in verify_delta_index_page()
465 if (get_immutable_start(memory, 0) != get_immutable_header_offset(list_count + 1)) in verify_delta_index_page()
469 for (i = 0; i < list_count; i++) { in verify_delta_index_page()
478 if (get_immutable_start(memory, list_count) > in verify_delta_index_page()
500 u64 list_count; in uds_initialize_delta_index_page() local
506 const u8 *list_count_addr = (const u8 *) &header->list_count; in uds_initialize_delta_index_page()
512 list_count = get_unaligned_le16(list_count_addr); in uds_initialize_delta_index_page()
513 if (!verify_delta_index_page(nonce, list_count, expected_nonce, memory, in uds_initialize_delta_index_page()
519 list_count = get_unaligned_be16(list_count_addr); in uds_initialize_delta_index_page()
520 if (!verify_delta_index_page(nonce, list_count, expected_nonce, memory, in uds_initialize_delta_index_page()
532 delta_index_page->delta_index.list_count = list_count; in uds_initialize_delta_index_page()
533 delta_index_page->delta_index.lists_per_zone = list_count; in uds_initialize_delta_index_page()
538 delta_index_page->highest_list_number = first_list + list_count - 1; in uds_initialize_delta_index_page()
555 delta_zone->list_count = list_count; in uds_initialize_delta_index_page()
709 u32 first_list, u32 *list_count) in uds_pack_delta_index_page() argument
723 max_lists = delta_index->list_count - first_list; in uds_pack_delta_index_page()
750 *list_count = n_lists; in uds_pack_delta_index_page()
757 put_unaligned_le16(n_lists, (u8 *) &header->list_count); in uds_pack_delta_index_page()
786 u32 tail_guard_index = delta_zone->list_count + 1; in compute_new_list_offsets()
788 spacing = (delta_zone->size - used_space) / delta_zone->list_count; in compute_new_list_offsets()
790 for (i = 0; i <= delta_zone->list_count; i++) { in compute_new_list_offsets()
814 for (i = 0; i <= delta_zone->list_count + 1; i++) in rebalance_lists()
818 for (i = 1; i <= delta_zone->list_count + 1; i++) in rebalance_lists()
832 u32 list_count[MAX_ZONES]; in uds_start_restoring_delta_index() local
855 decode_u32_le(buffer, &offset, &header.list_count); in uds_start_restoring_delta_index()
885 list_count[z] = header.list_count; in uds_start_restoring_delta_index()
895 list_next += list_count[z]; in uds_start_restoring_delta_index()
898 if (list_next != delta_index->list_count) { in uds_start_restoring_delta_index()
901 list_next, delta_index->list_count); in uds_start_restoring_delta_index()
920 for (i = 0; i < list_count[z]; i++) { in uds_start_restoring_delta_index()
962 if (list_number >= delta_zone->list_count) { in restore_delta_list_to_zone()
966 delta_zone->first_list + delta_zone->list_count); in restore_delta_list_to_zone()
1020 if (save_info.index >= delta_index->list_count) { in restore_delta_list_data()
1024 delta_index->list_count); in restore_delta_list_data()
1135 encode_u32_le(buffer, &offset, delta_zone->list_count); in uds_start_saving_delta_index()
1150 for (i = 0; i < delta_zone->list_count; i++) { in uds_start_saving_delta_index()
1177 for (i = 0; i < delta_zone->list_count; i++) { in uds_finish_saving_delta_index()
1205 size_t uds_compute_delta_index_save_bytes(u32 list_count, size_t memory_size) in uds_compute_delta_index_save_bytes() argument
1209 list_count * (sizeof(struct delta_list_save_info) + 1) + in uds_compute_delta_index_save_bytes()
1239 result = VDO_ASSERT((list_number < delta_index->list_count), in uds_start_delta_index_search()
1241 delta_index->list_count); in uds_start_delta_index_search()
1248 result = VDO_ASSERT((list_number < delta_zone->list_count), in uds_start_delta_index_search()
1250 list_number, delta_zone->list_count, zone_number); in uds_start_delta_index_search()
1559 for (i = 0; i <= delta_zone->list_count + 1; i++) in extend_delta_zone()
1572 rebalance_delta_zone(delta_zone, 1, delta_zone->list_count + 1); in extend_delta_zone()
1920 stats->list_count += delta_zone->list_count; in uds_get_delta_index_stats()
1935 u32 uds_get_delta_index_page_count(u32 entry_count, u32 list_count, u32 mean_delta, in uds_get_delta_index_page_count() argument
1945 bits_per_delta_list = bits_per_index / list_count; in uds_get_delta_index_page_count()
1948 bits_per_index += list_count * IMMUTABLE_HEADER_SIZE; in uds_get_delta_index_page_count()