drivers/md/dm-vdo/indexer/sparse-cache.h
Source file repositories/reference/linux-study-clean/drivers/md/dm-vdo/indexer/sparse-cache.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-vdo/indexer/sparse-cache.h- Extension
.h- Size
- 1794 bytes
- Lines
- 47
- 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
geometry.hindexer.h
Detected Declarations
struct index_zonestruct sparse_cache
Annotated Snippet
#ifndef UDS_SPARSE_CACHE_H
#define UDS_SPARSE_CACHE_H
#include "geometry.h"
#include "indexer.h"
/*
* The sparse cache is a cache of entire chapter indexes from sparse chapters used for searching
* for names after all other search paths have failed. It contains only complete chapter indexes;
* record pages from sparse chapters and single index pages used for resolving hooks are kept in
* the regular page cache in the volume.
*
* The most important property of this cache is the absence of synchronization for read operations.
* Safe concurrent access to the cache by the zone threads is controlled by the triage queue and
* the barrier requests it issues to the zone queues. The set of cached chapters does not and must
* not change between the carefully coordinated calls to uds_update_sparse_cache() from the zone
* threads. Outside of updates, every zone will get the same result when calling
* uds_sparse_cache_contains() as every other zone.
*/
struct index_zone;
struct sparse_cache;
int __must_check uds_make_sparse_cache(const struct index_geometry *geometry,
unsigned int capacity, unsigned int zone_count,
struct sparse_cache **cache_ptr);
void uds_free_sparse_cache(struct sparse_cache *cache);
bool uds_sparse_cache_contains(struct sparse_cache *cache, u64 virtual_chapter,
unsigned int zone_number);
int __must_check uds_update_sparse_cache(struct index_zone *zone, u64 virtual_chapter);
void uds_invalidate_sparse_cache(struct sparse_cache *cache);
int __must_check uds_search_sparse_cache(struct index_zone *zone,
const struct uds_record_name *name,
u64 *virtual_chapter_ptr, u16 *record_page_ptr);
#endif /* UDS_SPARSE_CACHE_H */
Annotation
- Immediate include surface: `geometry.h`, `indexer.h`.
- Detected declarations: `struct index_zone`, `struct sparse_cache`.
- 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.