drivers/block/drbd/drbd_main.c
Source file repositories/reference/linux-study-clean/drivers/block/drbd/drbd_main.c
File Facts
- System
- Linux kernel
- Corpus path
drivers/block/drbd/drbd_main.c- Extension
.c- Size
- 110402 bytes
- Lines
- 3778
- Domain
- Driver Families
- Bucket
- drivers/block
- 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/module.hlinux/jiffies.hlinux/drbd.hlinux/uaccess.hasm/types.hnet/sock.hlinux/ctype.hlinux/mutex.hlinux/fs.hlinux/file.hlinux/proc_fs.hlinux/init.hlinux/mm.hlinux/memcontrol.hlinux/mm_inline.hlinux/slab.hlinux/string.hlinux/random.hlinux/reboot.hlinux/notifier.hlinux/kthread.hlinux/workqueue.hlinux/unistd.hlinux/vmalloc.hlinux/sched/signal.hlinux/drbd_limits.hdrbd_int.hdrbd_protocol.hdrbd_req.hdrbd_vli.hdrbd_debugfs.hlinux/moduleparam.h
Detected Declarations
struct completion_workstruct meta_data_on_diskstruct fault_random_statefunction _get_ldev_if_statefunction tl_releasefunction _tl_restartfunction list_for_each_entry_safefunction tl_restartfunction tl_clearfunction tl_abort_disk_iofunction drbd_thread_setupfunction drbd_thread_initfunction drbd_thread_startfunction _drbd_thread_stopfunction drbd_calc_cpu_maskfunction for_each_resource_rcufunction for_each_online_cpufunction drbd_thread_current_set_cpufunction drbd_header_sizefunction prepare_header80function prepare_header95function prepare_header100function prepare_headerfunction __send_commandfunction __conn_send_commandfunction conn_send_commandfunction drbd_send_commandfunction drbd_send_pingfunction drbd_send_ping_ackfunction drbd_send_sync_paramfunction __drbd_send_protocolfunction drbd_send_protocolfunction _drbd_send_uuidsfunction drbd_send_uuidsfunction drbd_send_uuids_skip_initial_syncfunction drbd_print_uuidsfunction drbd_gen_and_send_sync_uuidfunction drbd_send_sizesfunction drbd_send_current_statefunction drbd_send_statefunction drbd_send_state_reqfunction conn_send_state_reqfunction drbd_send_sr_replyfunction conn_send_sr_replyfunction dcbp_set_codefunction dcbp_set_startfunction dcbp_set_pad_bitsfunction fill_bitmap_rle_bits
Annotated Snippet
module_init(drbd_init)
module_exit(drbd_cleanup)
EXPORT_SYMBOL(drbd_conn_str);
EXPORT_SYMBOL(drbd_role_str);
EXPORT_SYMBOL(drbd_disk_str);
EXPORT_SYMBOL(drbd_set_st_err_str);
Annotation
- Immediate include surface: `linux/module.h`, `linux/jiffies.h`, `linux/drbd.h`, `linux/uaccess.h`, `asm/types.h`, `net/sock.h`, `linux/ctype.h`, `linux/mutex.h`.
- Detected declarations: `struct completion_work`, `struct meta_data_on_disk`, `struct fault_random_state`, `function _get_ldev_if_state`, `function tl_release`, `function _tl_restart`, `function list_for_each_entry_safe`, `function tl_restart`, `function tl_clear`, `function tl_abort_disk_io`.
- Atlas domain: Driver Families / drivers/block.
- 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.