drivers/md/dm-pcache/dm_pcache.c
Source file repositories/reference/linux-study-clean/drivers/md/dm-pcache/dm_pcache.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-pcache/dm_pcache.c- Extension
.c- Size
- 11348 bytes
- Lines
- 498
- Domain
- Driver Families
- Bucket
- drivers/md
- Inferred role
- Driver Families: exported/initcall integration point
- Status
- integration 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.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Uses kernel synchronization; read lock ordering, sleepability, and interrupt context assumptions before translating.
- Allocates kernel memory; connect allocation flags and lifetime to context constraints.
- Defines or uses C structs; map object ownership, embedded links, reference counts, and lock ownership.
Dependency Surface
linux/module.hlinux/blkdev.hlinux/bio.h../dm-core.hcache_dev.hbacking_dev.hcache.hdm_pcache.h
Detected Declarations
function pcache_defer_reqs_kickfunction defer_reqfunction defered_req_fnfunction pcache_req_getfunction end_reqfunction pcache_req_putfunction at_least_one_argfunction parse_cache_devfunction parse_backing_devfunction pcache_init_optsfunction parse_cache_optsfunction pcache_startfunction pcache_destroy_argsfunction pcache_parse_argsfunction dm_pcache_ctrfunction defer_req_stopfunction dm_pcache_dtrfunction dm_pcache_map_biofunction dm_pcache_statusfunction dm_pcache_messagefunction dm_pcache_initfunction dm_pcache_exitmodule init dm_pcache_init
Annotated Snippet
module_init(dm_pcache_init);
static void __exit dm_pcache_exit(void)
{
dm_unregister_target(&dm_pcache_target);
pcache_cache_exit();
pcache_backing_exit();
}
module_exit(dm_pcache_exit);
MODULE_DESCRIPTION("dm-pcache Persistent Cache for block device");
MODULE_AUTHOR("Dongsheng Yang <dongsheng.yang@linux.dev>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/module.h`, `linux/blkdev.h`, `linux/bio.h`, `../dm-core.h`, `cache_dev.h`, `backing_dev.h`, `cache.h`, `dm_pcache.h`.
- Detected declarations: `function pcache_defer_reqs_kick`, `function defer_req`, `function defered_req_fn`, `function pcache_req_get`, `function end_req`, `function pcache_req_put`, `function at_least_one_arg`, `function parse_cache_dev`, `function parse_backing_dev`, `function pcache_init_opts`.
- Atlas domain: Driver Families / drivers/md.
- Implementation status: integration implementation candidate.
- Synchronization appears in or near this file; preserve lock ordering, sleepability, and interrupt-context constraints.
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.