block/bio.c
Source file repositories/reference/linux-study-clean/block/bio.c
File Facts
- System
- Linux kernel
- Corpus path
block/bio.c- Extension
.c- Size
- 54490 bytes
- Lines
- 1999
- Domain
- Representative Device Path
- Bucket
- PCIe NVMe Storage Path
- Inferred role
- Representative Device Path: exported/initcall integration point
- Status
- integration implementation candidate
Why This File Exists
Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Part of the selected hardware vertical slice: PCI discovery, driver binding, NVMe queues, block requests, DMA, interrupts, and completion.
- Exports symbols or registers init work; inspect boot/module ordering and who consumes the exported contract.
- Touches user memory; correctness depends on fault-safe copying and privilege boundary handling.
- 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/mm.hlinux/swap.hlinux/bio-integrity.hlinux/blkdev.hlinux/uio.hlinux/iocontext.hlinux/slab.hlinux/init.hlinux/kernel.hlinux/export.hlinux/mempool.hlinux/workqueue.hlinux/cgroup.hlinux/highmem.hlinux/blk-crypto.hlinux/xarray.hlinux/kmemleak.htrace/events/block.hblk.hblk-rq-qos.hblk-cgroup.h
Detected Declarations
struct bio_alloc_cachestruct bio_slabfunction bs_bio_slab_sizefunction bio_put_slabfunction try_alloc_gfpfunction bio_uninitfunction bio_freefunction bio_initfunction bio_resetfunction bio_reusefunction bio_chain_endiofunction bio_chainfunction bio_alloc_rescuefunction submit_bio_noacctfunction bio_alloc_irq_cache_splicefunction submit_bio_noacctfunction biofunction zero_fill_biofunction bio_truncatefunction bio_for_each_segmentfunction guard_bio_eodfunction __bio_alloc_cache_prunefunction bio_alloc_cache_prunefunction bio_cpu_deadfunction bio_alloc_cache_destroyfunction bio_put_percpu_cachefunction bio_putfunction __bio_clonefunction bio_alloc_clonefunction bio_fullfunction bvec_try_merge_pagefunction bvec_try_merge_hw_pagefunction __bio_add_pagefunction bio_add_virt_nofailfunction pagefunction bio_add_folio_nofailfunction bio_add_pagefunction flush_kernel_vmap_rangefunction flush_kernel_vmap_rangefunction __bio_release_pagesfunction bio_for_each_folio_allfunction bio_iov_bvec_setfunction bio_iov_iter_align_downfunction pagesfunction bio_free_foliosfunction bio_for_each_bvec_allfunction bio_iov_iter_bounce_writefunction bio_iov_iter_bounce_read
Annotated Snippet
subsys_initcall(init_bio);
Annotation
- Immediate include surface: `linux/mm.h`, `linux/swap.h`, `linux/bio-integrity.h`, `linux/blkdev.h`, `linux/uio.h`, `linux/iocontext.h`, `linux/slab.h`, `linux/init.h`.
- Detected declarations: `struct bio_alloc_cache`, `struct bio_slab`, `function bs_bio_slab_size`, `function bio_put_slab`, `function try_alloc_gfp`, `function bio_uninit`, `function bio_free`, `function bio_init`, `function bio_reset`, `function bio_reuse`.
- Atlas domain: Representative Device Path / PCIe NVMe Storage Path.
- Implementation status: integration implementation candidate.
- This snippet crosses the user/kernel memory boundary; validate fault handling and access checks before translating the pattern.
- 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.