drivers/md/dm-pcache/cache_dev.h
Source file repositories/reference/linux-study-clean/drivers/md/dm-pcache/cache_dev.h
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-pcache/cache_dev.h- Extension
.h- Size
- 2239 bytes
- Lines
- 71
- 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/device.hlinux/device-mapper.hpcache_internal.h
Detected Declarations
struct pcache_sbstruct pcache_cache_devstruct dm_pcache
Annotated Snippet
struct pcache_sb {
__le32 crc;
__le32 flags;
__le64 magic;
__le32 seg_num;
};
struct pcache_cache_dev {
u32 sb_flags;
u32 seg_num;
void *mapping;
bool use_vmap;
struct dm_dev *dm_dev;
struct mutex seg_lock;
unsigned long *seg_bitmap;
};
struct dm_pcache;
int cache_dev_start(struct dm_pcache *pcache);
void cache_dev_stop(struct dm_pcache *pcache);
void cache_dev_zero_range(struct pcache_cache_dev *cache_dev, void *pos, u32 size);
int cache_dev_get_empty_segment_id(struct pcache_cache_dev *cache_dev, u32 *seg_id);
#endif /* _PCACHE_CACHE_DEV_H */
Annotation
- Immediate include surface: `linux/device.h`, `linux/device-mapper.h`, `pcache_internal.h`.
- Detected declarations: `struct pcache_sb`, `struct pcache_cache_dev`, `struct dm_pcache`.
- 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.