drivers/md/dm-integrity.c
Source file repositories/reference/linux-study-clean/drivers/md/dm-integrity.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/md/dm-integrity.c- Extension
.c- Size
- 162551 bytes
- Lines
- 5476
- 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/compiler.hlinux/module.hlinux/device-mapper.hlinux/dm-io.hlinux/vmalloc.hlinux/sort.hlinux/rbtree.hlinux/delay.hlinux/hex.hlinux/random.hlinux/reboot.hcrypto/hash.hcrypto/skcipher.hcrypto/utils.hlinux/async_tx.hlinux/dm-bufio.hdm-audit.h
Detected Declarations
struct superblockstruct journal_entrystruct journal_sectorstruct journal_nodestruct alg_specstruct dm_integrity_cstruct dm_integrity_rangestruct dm_integrity_iostruct journal_completionstruct journal_iostruct bitmap_block_statusstruct flush_requestfunction prev_commit_seqfunction next_commit_seqfunction dm_integrity_io_errorfunction dm_integrity_failedfunction dm_integrity_disable_recalculatefunction dm_integrity_commit_idfunction get_area_and_offsetfunction get_metadata_sector_and_offsetfunction get_data_sectorfunction wraparound_sectionfunction sb_set_versionfunction sb_macfunction sync_rw_sbfunction block_bitmap_opfunction block_bitmap_copyfunction access_journal_checkfunction page_list_locationfunction section_macfunction rw_section_macfunction complete_journal_opfunction xor_journalfunction complete_journal_encryptfunction do_cryptfunction crypt_journalfunction encrypt_journalfunction complete_journal_iofunction rw_journal_sectorsfunction rw_journalfunction write_journalfunction copy_from_journalfunction ranges_overlapfunction add_new_rangefunction list_for_each_entryfunction remove_range_unlockedfunction remove_rangefunction wait_and_add_new_range
Annotated Snippet
module_init(dm_integrity_init);
module_exit(dm_integrity_exit);
MODULE_AUTHOR("Milan Broz");
MODULE_AUTHOR("Mikulas Patocka");
MODULE_DESCRIPTION(DM_NAME " target for integrity tags extension");
MODULE_LICENSE("GPL");
Annotation
- Immediate include surface: `dm-bio-record.h`, `linux/compiler.h`, `linux/module.h`, `linux/device-mapper.h`, `linux/dm-io.h`, `linux/vmalloc.h`, `linux/sort.h`, `linux/rbtree.h`.
- Detected declarations: `struct superblock`, `struct journal_entry`, `struct journal_sector`, `struct journal_node`, `struct alg_spec`, `struct dm_integrity_c`, `struct dm_integrity_range`, `struct dm_integrity_io`, `struct journal_completion`, `struct journal_io`.
- 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.