drivers/md/dm-mpath.c
Source file repositories/reference/linux-study-clean/drivers/md/dm-mpath.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-mpath.c- Extension
.c- Size
- 59998 bytes
- Lines
- 2386
- 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/device-mapper.hdm-rq.hdm-bio-record.hdm-path-selector.hdm-uevent.hlinux/blkdev.hlinux/ctype.hlinux/init.hlinux/mempool.hlinux/module.hlinux/pagemap.hlinux/slab.hlinux/time.hlinux/timer.hlinux/workqueue.hlinux/delay.hscsi/scsi_dh.hlinux/atomic.hlinux/blk-mq.h
Detected Declarations
struct pgpathstruct priority_groupstruct multipathstruct dm_mpath_iofunction mpath_double_check_test_bitfunction free_pgpathfunction free_pgpathsfunction list_for_each_entry_safefunction free_priority_groupfunction alloc_multipath_stage2function free_multipathfunction list_for_each_entry_safefunction multipath_per_bio_data_sizefunction multipath_init_per_bio_datafunction __pg_init_all_pathsfunction pg_init_all_pathsfunction __switch_pgfunction list_for_each_entryfunction dm_table_device_namefunction must_push_back_rqfunction requestsfunction mpath_double_check_test_bitfunction multipath_release_clonefunction biosfunction multipath_queue_biofunction mpath_double_check_test_bitfunction __multipath_map_biofunction multipath_map_biofunction process_queued_io_listfunction process_queued_biosfunction queue_if_no_pathfunction queue_if_no_path_timeout_workfunction enable_nopath_timeoutfunction disable_nopath_timeoutfunction trigger_eventfunction parse_path_selectorfunction setup_scsi_dhfunction parse_hw_handlerfunction parse_featuresfunction multipath_ctrfunction multipath_wait_for_pg_init_completionfunction flush_multipath_workfunction multipath_dtrfunction fail_pathfunction reinstate_pathfunction action_devfunction list_for_each_entryfunction bypass_pg
Annotated Snippet
module_init(dm_multipath_init);
module_exit(dm_multipath_exit);
module_param_named(queue_if_no_path_timeout_secs, queue_if_no_path_timeout_secs, ulong, 0644);
MODULE_PARM_DESC(queue_if_no_path_timeout_secs, "No available paths queue IO timeout in seconds");
MODULE_DESCRIPTION(DM_NAME " multipath target");
MODULE_AUTHOR("Sistina Software <dm-devel@lists.linux.dev>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/device-mapper.h`, `dm-rq.h`, `dm-bio-record.h`, `dm-path-selector.h`, `dm-uevent.h`, `linux/blkdev.h`, `linux/ctype.h`, `linux/init.h`.
- Detected declarations: `struct pgpath`, `struct priority_group`, `struct multipath`, `struct dm_mpath_io`, `function mpath_double_check_test_bit`, `function free_pgpath`, `function free_pgpaths`, `function list_for_each_entry_safe`, `function free_priority_group`, `function alloc_multipath_stage2`.
- 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.