drivers/md/dm-log.c
Source file repositories/reference/linux-study-clean/drivers/md/dm-log.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-log.c- Extension
.c- Size
- 20508 bytes
- Lines
- 917
- 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/init.hlinux/slab.hlinux/module.hlinux/vmalloc.hlinux/dm-io.hlinux/dm-dirty-log.hlinux/device-mapper.h
Detected Declarations
struct log_header_diskstruct log_header_corestruct log_cenum syncfunction put_typefunction dm_dirty_log_type_registerfunction dm_dirty_log_type_unregisterfunction intfunction dm_dirty_log_destroyfunction log_test_bitfunction log_set_bitfunction log_clear_bitfunction header_to_diskfunction header_from_diskfunction rw_headerfunction flush_headerfunction read_headerfunction _check_region_sizefunction create_log_contextfunction core_ctrfunction destroy_log_contextfunction core_dtrfunction disk_ctrfunction disk_dtrfunction fail_log_devicefunction disk_resumefunction core_get_region_sizefunction core_resumefunction core_is_cleanfunction core_in_syncfunction core_flushfunction disk_flushfunction core_mark_regionfunction core_clear_regionfunction core_get_resync_workfunction core_set_region_syncfunction core_get_sync_countfunction core_statusfunction disk_statusfunction dm_dirty_log_initfunction dm_dirty_log_exitmodule init dm_dirty_log_initexport dm_dirty_log_type_registerexport dm_dirty_log_type_unregisterexport dm_dirty_log_createexport dm_dirty_log_destroy
Annotated Snippet
module_init(dm_dirty_log_init);
module_exit(dm_dirty_log_exit);
MODULE_DESCRIPTION(DM_NAME " dirty region log");
MODULE_AUTHOR("Joe Thornber, Heinz Mauelshagen <dm-devel@lists.linux.dev>");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `linux/init.h`, `linux/slab.h`, `linux/module.h`, `linux/vmalloc.h`, `linux/dm-io.h`, `linux/dm-dirty-log.h`, `linux/device-mapper.h`.
- Detected declarations: `struct log_header_disk`, `struct log_header_core`, `struct log_c`, `enum sync`, `function put_type`, `function dm_dirty_log_type_register`, `function dm_dirty_log_type_unregister`, `function int`, `function dm_dirty_log_destroy`, `function log_test_bit`.
- 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.