drivers/md/dm-cache-target.c
Source file repositories/reference/linux-study-clean/drivers/md/dm-cache-target.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-cache-target.c- Extension
.c- Size
- 88220 bytes
- Lines
- 3613
- 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
dm.hdm-bio-prison-v2.hdm-bio-record.hdm-cache-metadata.hdm-io-tracker.hdm-cache-background-tracker.hlinux/dm-io.hlinux/dm-kcopyd.hlinux/jiffies.hlinux/init.hlinux/mempool.hlinux/module.hlinux/rwsem.hlinux/slab.hlinux/vmalloc.h
Detected Declarations
struct continuationstruct batcherstruct dm_hook_infostruct cache_featuresstruct cache_statsstruct cachestruct per_bio_datastruct dm_cache_migrationstruct cache_argsstruct discard_load_infostruct cblock_rangeenum cache_metadata_modeenum cache_io_modeenum busyfunction init_continuationfunction queue_continuationfunction __commitfunction list_for_each_entry_safefunction batcher_initfunction async_commitfunction continue_after_commitfunction issue_after_commitfunction schedule_commitfunction dm_hook_biofunction dm_unhook_biofunction writethrough_modefunction writeback_modefunction passthrough_modefunction wake_deferred_bio_workerfunction wake_migration_workerfunction free_prison_cellfunction free_migrationfunction oblock_succfunction build_keyfunction lock_levelfunction defer_biofunction defer_biosfunction bio_detain_sharedfunction is_dirtyfunction set_dirtyfunction force_set_dirtyfunction force_clear_dirtyfunction block_size_is_power_of_twofunction block_divfunction oblocks_per_dblockfunction oblock_to_dblockfunction set_discardfunction clear_discard
Annotated Snippet
module_init(dm_cache_init);
module_exit(dm_cache_exit);
MODULE_DESCRIPTION(DM_NAME " cache target");
MODULE_AUTHOR("Joe Thornber <ejt@redhat.com>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `dm.h`, `dm-bio-prison-v2.h`, `dm-bio-record.h`, `dm-cache-metadata.h`, `dm-io-tracker.h`, `dm-cache-background-tracker.h`, `linux/dm-io.h`, `linux/dm-kcopyd.h`.
- Detected declarations: `struct continuation`, `struct batcher`, `struct dm_hook_info`, `struct cache_features`, `struct cache_stats`, `struct cache`, `struct per_bio_data`, `struct dm_cache_migration`, `struct cache_args`, `struct discard_load_info`.
- 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.