Lines Matching full:record
20 * open chapter space. Records are assigned to zones based on their record name. Within each zone,
22 * record is stored in a hash table to help determine if a new record duplicates an existing one.
23 * If new metadata for an existing name arrives, the record is altered in place. The array of
24 * records is 1-based so that record number 0 can be used to indicate an unused hash slot.
28 * indexed by record number instead of by record name. The number of hash slots will always be a
33 * each zone are interleaved to attempt to preserve temporal locality and assigned to record pages.
34 * Empty or deleted records are replaced by copies of a valid record so that the record pages only
35 * contain valid records. The chapter then constructs a delta index which maps each record name to
36 * the record page on which that record can be found, which is split into index pages. These
42 * zones. In addition, depending on the distribution of record names, a new zone may have more
79 result = vdo_allocate_cache_aligned(records_size(open_chapter), "record pages", in uds_make_open_chapter()
102 struct uds_volume_record *record; in probe_chapter_slots() local
113 * record and should terminate the search. in probe_chapter_slots()
119 * If the name of the record referenced by the slot matches and has not been in probe_chapter_slots()
122 record = &open_chapter->records[record_number]; in probe_chapter_slots()
123 if ((memcmp(&record->name, name, UDS_RECORD_NAME_SIZE) == 0) && in probe_chapter_slots()
152 /* Add a record to the open chapter zone and return the remaining space. */
159 struct uds_volume_record *record; in uds_put_open_chapter() local
172 record = &open_chapter->records[record_number]; in uds_put_open_chapter()
173 record->name = *name; in uds_put_open_chapter()
174 record->data = *metadata; in uds_put_open_chapter()
202 /* Map each record name to its record page number in the delta chapter index. */
219 * The record pages should not have any empty space, so find a record with which to fill in fill_delta_chapter_index()
221 * last record in any filled zone is guaranteed to not have been deleted, so use one of in fill_delta_chapter_index()
237 struct uds_volume_record *record = &collated_records[records]; in fill_delta_chapter_index() local
240 /* The record arrays in the zones are 1-based. */ in fill_delta_chapter_index()
245 /* Use the fill record in place of an unused record. */ in fill_delta_chapter_index()
248 *record = *fill_record; in fill_delta_chapter_index()
252 *record = open_chapter->records[record_index]; in fill_delta_chapter_index()
253 result = uds_put_open_chapter_index_record(index, &record->name, in fill_delta_chapter_index()
296 struct uds_volume_record *record; in uds_save_open_chapter() local
333 record = &open_chapter->records[record_index]; in uds_save_open_chapter()
334 result = uds_write_to_buffered_writer(writer, (u8 *) record, in uds_save_open_chapter()
335 sizeof(*record)); in uds_save_open_chapter()
361 struct uds_volume_record record; in load_version20() local
381 result = uds_read_from_buffered_reader(reader, (u8 *) &record, in load_version20()
382 sizeof(record)); in load_version20()
388 &record.name); in load_version20()
395 remaining = uds_put_open_chapter(open_chapter, &record.name, in load_version20()
396 &record.data); in load_version20()