drivers/md/dm-raid1.c
Source file repositories/reference/linux-study-clean/drivers/md/dm-raid1.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-raid1.c- Extension
.c- Size
- 36690 bytes
- Lines
- 1532
- 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-bio-record.hlinux/init.hlinux/mempool.hlinux/module.hlinux/pagemap.hlinux/slab.hlinux/workqueue.hlinux/device-mapper.hlinux/dm-io.hlinux/dm-dirty-log.hlinux/dm-kcopyd.hlinux/dm-region-hash.h
Detected Declarations
struct mirrorstruct mirror_setstruct dm_raid1_bio_recordenum dm_raid1_errorfunction wakeup_mirrordfunction delayed_wake_fnfunction delayed_wakefunction wakeup_all_recovery_waitersfunction queue_biofunction dispatch_biosfunction bio_set_mfunction set_default_mirrorfunction fail_mirrorfunction mirror_flushfunction recovery_completefunction recoverfunction reset_ms_flagsfunction do_recoveryfunction default_okfunction mirror_availablefunction map_sectorfunction map_biofunction map_regionfunction hold_biofunction read_callbackfunction read_async_biofunction region_in_syncfunction do_readsfunction write_callbackfunction do_writefunction do_writesfunction do_failuresfunction trigger_eventfunction do_mirrorfunction free_contextfunction get_mirrorfunction parse_featuresfunction mirror_ctrfunction mirror_dtrfunction mirror_mapfunction mirror_end_iofunction mirror_presuspendfunction mirror_postsuspendfunction mirror_resumefunction device_status_charfunction mirror_statusfunction mirror_iterate_devicesfunction dm_mirror_init
Annotated Snippet
module_init(dm_mirror_init);
module_exit(dm_mirror_exit);
MODULE_DESCRIPTION(DM_NAME " mirror target");
MODULE_AUTHOR("Joe Thornber");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `dm-bio-record.h`, `linux/init.h`, `linux/mempool.h`, `linux/module.h`, `linux/pagemap.h`, `linux/slab.h`, `linux/workqueue.h`, `linux/device-mapper.h`.
- Detected declarations: `struct mirror`, `struct mirror_set`, `struct dm_raid1_bio_record`, `enum dm_raid1_error`, `function wakeup_mirrord`, `function delayed_wake_fn`, `function delayed_wake`, `function wakeup_all_recovery_waiters`, `function queue_bio`, `function dispatch_bios`.
- 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.