drivers/md/dm-thin.c
Source file repositories/reference/linux-study-clean/drivers/md/dm-thin.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-thin.c- Extension
.c- Size
- 115500 bytes
- Lines
- 4559
- 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-thin-metadata.hdm-bio-prison-v1.hdm.hlinux/device-mapper.hlinux/dm-io.hlinux/dm-kcopyd.hlinux/jiffies.hlinux/log2.hlinux/list.hlinux/rculist.hlinux/init.hlinux/module.hlinux/slab.hlinux/vmalloc.hlinux/sort.hlinux/rbtree.h
Detected Declarations
struct throttlestruct dm_thin_new_mappingstruct pool_featuresstruct thin_cstruct poolstruct pool_cstruct thin_cstruct discard_opstruct dm_thin_endio_hookstruct dm_thin_new_mappingstruct remap_infostruct pool_workstruct noflush_workenum lock_spaceenum pool_modefunction build_keyfunction build_data_keyfunction build_virtual_keyfunction throttle_initfunction throttle_work_startfunction throttle_work_updatefunction throttle_work_completefunction throttle_lockfunction throttle_unlockfunction get_pool_modefunction notify_of_pool_mode_changefunction block_size_is_power_of_twofunction block_to_sectorsfunction begin_discardfunction issue_discardfunction end_discardfunction wake_workerfunction bio_detainfunction cell_releasefunction cell_visit_releasefunction cell_release_no_holderfunction cell_error_with_codefunction get_pool_io_error_codefunction cell_errorfunction cell_successfunction cell_requeuefunction pool_table_initfunction pool_table_exitfunction __pool_table_insertfunction __pool_table_removefunction list_for_each_entryfunction list_for_each_entryfunction error_bio_list
Annotated Snippet
module_init(dm_thin_init);
module_exit(dm_thin_exit);
module_param_named(no_space_timeout, no_space_timeout_secs, uint, 0644);
MODULE_PARM_DESC(no_space_timeout, "Out of data space queue IO timeout in seconds");
MODULE_DESCRIPTION(DM_NAME " thin provisioning target");
MODULE_AUTHOR("Joe Thornber <dm-devel@lists.linux.dev>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `dm-thin-metadata.h`, `dm-bio-prison-v1.h`, `dm.h`, `linux/device-mapper.h`, `linux/dm-io.h`, `linux/dm-kcopyd.h`, `linux/jiffies.h`, `linux/log2.h`.
- Detected declarations: `struct throttle`, `struct dm_thin_new_mapping`, `struct pool_features`, `struct thin_c`, `struct pool`, `struct pool_c`, `struct thin_c`, `struct discard_op`, `struct dm_thin_endio_hook`, `struct dm_thin_new_mapping`.
- 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.