/* * The volume manages deduplication records on permanent storage. The term "volume" can also refer * to the region of permanent storage where the records (and the chapters containing them) are * stored. The volume handles all I/O to this region by reading, caching, and writing chapter pages * as necessary.
*/
enum index_lookup_mode { /* Always do lookups in all chapters normally */
LOOKUP_NORMAL, /* Only do a subset of lookups needed when rebuilding an index */
LOOKUP_FOR_REBUILD,
};
struct cached_page { /* Whether this page is currently being read asynchronously */ bool read_pending; /* The physical page stored in this cache entry */
u32 physical_page; /* The value of the volume clock when this page was last used */
s64 last_used; /* The cached page buffer */ struct dm_buffer *buffer; /* The chapter index page, meaningless for record pages */ struct delta_index_page index_page;
};
struct page_cache { /* The number of zones */ unsignedint zone_count; /* The number of volume pages that can be cached */
u32 indexable_pages; /* The maximum number of simultaneously cached pages */
u16 cache_slots; /* An index for each physical page noting where it is in the cache */
u16 *index; /* The array of cached pages */ struct cached_page *cache; /* A counter for each zone tracking if a search is occurring there */ struct search_pending_counter *search_pending_counters; /* The read queue entries as a circular array */ struct queued_read *read_queue;
/* All entries above this point are constant after initialization. */
/* * These values are all indexes into the array of read queue entries. New entries in the * read queue are enqueued at read_queue_last. To dequeue entries, a reader thread gets the * lock and then claims the entry pointed to by read_queue_next_read and increments that * value. After the read is completed, the reader thread calls release_read_queue_entry(), * which increments read_queue_first until it points to a pending read, or is equal to * read_queue_next_read. This means that if multiple reads are outstanding, * read_queue_first might not advance until the last of the reads finishes.
*/
u16 read_queue_first;
u16 read_queue_next_read;
u16 read_queue_last;
/* A single page worth of records, for sorting */ conststruct uds_volume_record **record_pointers; /* Sorter for sorting records within each page */ struct radix_sorter *radix_sorter;
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.