drivers/md/dm-vdo/indexer/delta-index.h
Source file repositories/reference/linux-study-clean/drivers/md/dm-vdo/indexer/delta-index.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-vdo/indexer/delta-index.h- Extension
.h- Size
- 9681 bytes
- Lines
- 280
- Domain
- Driver Families
- Bucket
- drivers/md
- Inferred role
- Driver Families: implementation source
- Status
- source implementation candidate
Why This File Exists
Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Repeatable hardware-adapter layer. Deep compatibility for every driver is out of scope; this atlas records patterns, probe lifecycles, bus glue, IRQ/DMA usage, and links back to core abstractions.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/cache.hnumeric.htime-utils.hconfig.hio-factory.h
Detected Declarations
struct delta_liststruct delta_zonestruct delta_list_save_infostruct delta_indexstruct delta_index_pagestruct delta_index_entrystruct delta_index_stats
Annotated Snippet
struct delta_list {
/* The offset of the delta list start, in bits */
u64 start;
/* The number of bits in the delta list */
u16 size;
/* Where the last search "found" the key, in bits */
u16 save_offset;
/* The key for the record just before save_offset */
u32 save_key;
};
struct delta_zone {
/* The delta list memory */
u8 *memory;
/* The delta list headers */
struct delta_list *delta_lists;
/* Temporary starts of delta lists */
u64 *new_offsets;
/* Buffered writer for saving an index */
struct buffered_writer *buffered_writer;
/* The size of delta list memory */
size_t size;
/* Nanoseconds spent rebalancing */
ktime_t rebalance_time;
/* Number of memory rebalances */
u32 rebalance_count;
/* The number of bits in a stored value */
u8 value_bits;
/* The number of bits in the minimal key code */
u16 min_bits;
/* The number of keys used in a minimal code */
u32 min_keys;
/* The number of keys used for another code bit */
u32 incr_keys;
/* The number of records in the index */
u64 record_count;
/* The number of collision records */
u64 collision_count;
/* The number of records removed */
u64 discard_count;
/* The number of UDS_OVERFLOW errors detected */
u64 overflow_count;
/* The index of the first delta list */
u32 first_list;
/* The number of delta lists */
u32 list_count;
/* Tag belonging to this delta index */
u8 tag;
} __aligned(L1_CACHE_BYTES);
struct delta_list_save_info {
/* Tag identifying which delta index this list is in */
u8 tag;
/* Bit offset of the start of the list data */
u8 bit_offset;
/* Number of bytes of list data */
u16 byte_count;
/* The delta list number within the delta index */
u32 index;
} __packed;
struct delta_index {
/* The zones */
struct delta_zone *delta_zones;
/* The number of zones */
unsigned int zone_count;
/* The number of delta lists */
u32 list_count;
/* Maximum lists per zone */
u32 lists_per_zone;
/* Total memory allocated to this index */
size_t memory_size;
/* The number of non-empty lists at load time per zone */
u32 load_lists[MAX_ZONES];
/* True if this index is mutable */
bool mutable;
/* Tag belonging to this delta index */
u8 tag;
};
/*
* A delta_index_page describes a single page of a chapter index. The delta_index field allows the
* page to be treated as an immutable delta_index. We use the delta_zone field to treat the chapter
* index page as a single zone index, and without the need to do an additional memory allocation.
*/
struct delta_index_page {
struct delta_index delta_index;
/* These values are loaded from the delta_page_header */
u32 lowest_list_number;
u32 highest_list_number;
Annotation
- Immediate include surface: `linux/cache.h`, `numeric.h`, `time-utils.h`, `config.h`, `io-factory.h`.
- Detected declarations: `struct delta_list`, `struct delta_zone`, `struct delta_list_save_info`, `struct delta_index`, `struct delta_index_page`, `struct delta_index_entry`, `struct delta_index_stats`.
- Atlas domain: Driver Families / drivers/md.
- Implementation status: source implementation candidate.
Implementation Notes
- This generated page is the file-by-file coverage layer; curated subsystem chapters should link here when they synthesize a multi-file control flow.
- Core OS pages should be promoted from atlas-only to deep-reviewed when they explain data structures, invariants, locking, lifecycle, and C implementation snippets.
- Driver-family pages are intentionally pattern-oriented unless they are part of the selected PCIe/NVMe representative device path.