Lines Matching refs:delta_list

142 static inline u64 get_delta_list_byte_start(const struct delta_list *delta_list)  in get_delta_list_byte_start()  argument
144 return delta_list->start / BITS_PER_BYTE; in get_delta_list_byte_start()
147 static inline u16 get_delta_list_byte_size(const struct delta_list *delta_list) in get_delta_list_byte_size() argument
149 unsigned int bit_offset = delta_list->start % BITS_PER_BYTE; in get_delta_list_byte_size()
151 return BITS_TO_BYTES(bit_offset + delta_list->size); in get_delta_list_byte_size()
157 struct delta_list *delta_list; in rebalance_delta_zone() local
162 delta_list = &delta_zone->delta_lists[first]; in rebalance_delta_zone()
164 if (delta_list->start != new_start) { in rebalance_delta_zone()
168 source = get_delta_list_byte_start(delta_list); in rebalance_delta_zone()
169 delta_list->start = new_start; in rebalance_delta_zone()
170 destination = get_delta_list_byte_start(delta_list); in rebalance_delta_zone()
173 get_delta_list_byte_size(delta_list)); in rebalance_delta_zone()
183 delta_list = &delta_zone->delta_lists[middle]; in rebalance_delta_zone()
190 if (new_start > delta_list->start) { in rebalance_delta_zone()
223 struct delta_list *delta_lists = zone->delta_lists; in uds_reset_delta_index()
227 (zone->list_count + 2) * sizeof(struct delta_list)); in uds_reset_delta_index()
324 result = vdo_allocate(list_count + 2, struct delta_list, "delta lists", in initialize_delta_zone()
396 (lists_in_zone + 2) * (sizeof(struct delta_list) + sizeof(u64))); in uds_initialize_delta_index()
712 struct delta_list *delta_lists; in uds_pack_delta_index_page()
785 struct delta_list *delta_lists = delta_zone->delta_lists; in compute_new_list_offsets()
808 struct delta_list *delta_lists; in rebalance_lists()
957 struct delta_list *delta_list; in restore_delta_list_to_zone() local
969 delta_list = &delta_zone->delta_lists[list_number + 1]; in restore_delta_list_to_zone()
970 if (delta_list->size == 0) { in restore_delta_list_to_zone()
976 bit_count = delta_list->size + save_info->bit_offset; in restore_delta_list_to_zone()
984 move_bits(data, save_info->bit_offset, delta_zone->memory, delta_list->start, in restore_delta_list_to_zone()
985 delta_list->size); in restore_delta_list_to_zone()
1091 struct delta_list *delta_list; in flush_delta_list() local
1095 delta_list = &zone->delta_lists[flush_index + 1]; in flush_delta_list()
1098 buffer[1] = delta_list->start % BITS_PER_BYTE; in flush_delta_list()
1099 put_unaligned_le16(get_delta_list_byte_size(delta_list), &buffer[2]); in flush_delta_list()
1110 zone->memory + get_delta_list_byte_start(delta_list), in flush_delta_list()
1111 get_delta_list_byte_size(delta_list)); in flush_delta_list()
1152 struct delta_list *delta_list; in uds_start_saving_delta_index() local
1154 delta_list = &delta_zone->delta_lists[i + 1]; in uds_start_saving_delta_index()
1155 put_unaligned_le16(delta_list->size, data); in uds_start_saving_delta_index()
1174 struct delta_list *delta_list; in uds_finish_saving_delta_index() local
1178 delta_list = &delta_zone->delta_lists[i + 1]; in uds_finish_saving_delta_index()
1179 if (delta_list->size > 0) { in uds_finish_saving_delta_index()
1237 struct delta_list *delta_list; in uds_start_delta_index_search() local
1255 delta_list = &delta_zone->delta_lists[list_number + 1]; in uds_start_delta_index_search()
1263 delta_list = &delta_entry->temp_delta_list; in uds_start_delta_index_search()
1264 delta_list->start = get_immutable_start(delta_zone->memory, list_number); in uds_start_delta_index_search()
1266 delta_list->size = end_offset - delta_list->start; in uds_start_delta_index_search()
1267 delta_list->save_key = 0; in uds_start_delta_index_search()
1268 delta_list->save_offset = 0; in uds_start_delta_index_search()
1271 if (key > delta_list->save_key) { in uds_start_delta_index_search()
1272 delta_entry->key = delta_list->save_key; in uds_start_delta_index_search()
1273 delta_entry->offset = delta_list->save_offset; in uds_start_delta_index_search()
1282 uds_prefetch_range(&delta_zone->memory[delta_list->start / BITS_PER_BYTE], in uds_start_delta_index_search()
1283 delta_list->size / BITS_PER_BYTE, false); in uds_start_delta_index_search()
1289 delta_entry->delta_list = delta_list; in uds_start_delta_index_search()
1300 return delta_entry->delta_list->start + delta_entry->offset; in get_delta_entry_offset()
1350 const struct delta_list *delta_list; in uds_next_delta_index_entry() local
1358 delta_list = delta_entry->delta_list; in uds_next_delta_index_entry()
1360 size = delta_list->size; in uds_next_delta_index_entry()
1391 struct delta_list *delta_list = delta_entry->delta_list; in uds_remember_delta_index_offset() local
1397 delta_list->save_key = delta_entry->key - delta_entry->delta; in uds_remember_delta_index_offset()
1398 delta_list->save_offset = delta_entry->offset; in uds_remember_delta_index_offset()
1509 int result = VDO_ASSERT((delta_entry->delta_list != &delta_entry->temp_delta_list), in assert_mutable_entry()
1550 struct delta_list *delta_lists; in extend_delta_zone()
1589 struct delta_list *delta_list = delta_entry->delta_list; in insert_bits() local
1591 u32 total_size = delta_list->size; in insert_bits()
1602 free_before = (delta_list[0].start - (delta_list[-1].start + delta_list[-1].size)); in insert_bits()
1603 free_after = (delta_list[1].start - (delta_list[0].start + delta_list[0].size)); in insert_bits()
1641 delta_list->size += size; in insert_bits()
1643 source = delta_list->start; in insert_bits()
1645 delta_list->start -= size; in insert_bits()
1648 source = delta_list->start + delta_entry->offset; in insert_bits()
1717 if (delta_entry->offset < delta_entry->delta_list->save_offset) { in uds_put_delta_index_entry()
1806 struct delta_list *delta_list = delta_entry->delta_list; in delete_bits() local
1809 u32 total_size = delta_list->size; in delete_bits()
1824 (delta_list[0].start - (delta_list[-1].start + delta_list[-1].size)); in delete_bits()
1826 (delta_list[1].start - (delta_list[0].start + delta_list[0].size)); in delete_bits()
1831 delta_list->size -= size; in delete_bits()
1833 source = delta_list->start; in delete_bits()
1835 delta_list->start += size; in delete_bits()
1838 destination = delta_list->start + delta_entry->offset; in delete_bits()
1851 struct delta_list *delta_list; in uds_remove_delta_index_entry() local
1895 delta_list = delta_entry->delta_list; in uds_remove_delta_index_entry()
1896 if (delta_entry->offset < delta_list->save_offset) { in uds_remove_delta_index_entry()
1898 delta_list->save_key = 0; in uds_remove_delta_index_entry()
1899 delta_list->save_offset = 0; in uds_remove_delta_index_entry()
1967 delta_entry->delta_list->size, in uds_log_delta_index_entry()