bdev_rw_virt(9)
π¦ bdev_rw_virt(9) β Kernel API Manual, but make it cute π¦
okay so welcome to the bdev_rw_virt(9) page, bestie. This is the Kernel API Manual entry for synchronous read/write into kernel mappings, and weβre gonna make it make sense. No cap. β¨
β¨ NAME β¨
bdev_rw_virt - synchronously read into / write from kernel mapping. Thatβs the name, thatβs the job, thatβs the vibe check. π
πΈ SYNOPSIS πΈ
int bdev_rw_virt (struct block_device *bdev , sector_t sector , void
*data , size_t len , enum req_op op );
Yep, thatβs the whole signature. Keep it exactly like that β kernel API energy does not do βclose enough,β fr fr. π
π ARGUMENTS π
bdevβ block device to access. The block device bestie. π«Άsectorβ sector to access. Yes, sector, not sector-adjacent. πdataβ data to read/write. The payload of the operation. πlenβ length in byte to read/write. Keep the unit exactly as the page says. πΈopβ operation (e.g.REQ_OP_READ/REQ_OP_WRITE). This tells it which direction the vibe is going. π₯
π DESCRIPTION π
Performs synchronous I/O to bdev for data/len. So itβs sync I/O, not βIβll get back to you laterβ energy. π
π¨ Important caveat: data must be in the kernel direct mapping and not a vmalloc address. Do not ignore this, bestie β this is the βread the instructions before you touch the kernelβ part. π
π¦ SEE ALSO π¦
Kernel file ./block/bio.c β and the whole bio friend group, in the order the page lists them:
bio_reset(9)bio_reuse(9)bio_chain(9)bio_chain_and_submit(9)bio_alloc_bioset(9)bio_kmalloc(9)bio_truncate(9)guard_bio_eod(9)bio_put(9)bio_alloc_clone(9)bio_init_clone(9)bio_full(9)__bio_add_page(9)bio_add_virt_nofail(9)bio_add_page(9)bio_add_folio(9)bio_add_vmalloc_chunk(9)bio_add_vmalloc(9)bio_iov_iter_get_pages(9)bio_iov_iter_bounce(9)bio_iov_iter_unbounce(9)bio_await(9)submit_bio_wait(9)bio_copy_data(9)bio_endio(9)bio_split(9)bio_trim(9)bioset_init(9)
Thatβs the page, bestie! π Source/version: ./block Β· Date: October 2026. Go forth and slay your synchronous I/O with the correct mapping energy. π«Άβ¨
π¦ where this page comes from
- nixpkgs unstable: linux-manual 7.3.1
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms