bio_reset(9)
β¨ bio_reset(9) β a manual page for my bestie β¨
okay so you know how we're always in the kernel together, right? this is literally the bio_reset(9) page from the Kernel API Manual and it's giving "fresh start" energy, so let's get into it π
πΈ NAME πΈ
bio_reset β reinitialize a bio
(like, imagine hitting ctrl+z on a bio's whole life but in a good way, yk? it's a redo button but make it β¨iconicβ¨)
π¦ SYNOPSIS π¦
void bio_reset (struct bio *bio , struct block_device *bdev , blk_opf_t opf );
no cap, that's the whole vibe β void return, takes a bio pointer, a block device pointer, and an opf thing. slay.
π ARGUMENTS π
bioβ the bio to reset. like, this is the main character we're reviving, periodt.bdevβ block device to use the bio for. your bio's new home address fr fr π‘opfβ operation and flags for bio. the little settings menu, if you will π
π DESCRIPTION π
okay so after you call bio_reset, your bio is literally in the same state as a freshly allocated bio that bio_alloc_bioset returned β yes, bestie, it's that fresh-out-of-the-box energy β¨
the only fields that are preserved are the ones that are initialized by bio_alloc_bioset. that's it. everything else gets the reset treatment. see the comment in struct bio for the full tea β
no cap, this is the "new phone who dis" of kernel data structures β but the fields that bio_alloc_bioset sets up? those stay, and they're the only ones, iykyk.
π₯ SEE ALSO π₯
like, the whole squad is here β these are the related functions and files you might wanna know about:
- Kernel file
./block/bio.c 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)bdev_rw_virt(9)bio_copy_data(9)bio_endio(9)bio_split(9)bio_trim(9)bioset_init(9)
go off, read them all, collect them like pokΓ©mon cards, idc β they're all right there in the kernel, living their best lives π«Ά
π vibe check: this page lives at./blockin the kernel source, and likeβ¦ the date on it isOctober 2026?? which is giving "we're from the future" and honestly? iconic. the manual section is the Kernel API Manual, and yes, the function name isbio_reset(9)β we been knew. stay fresh, bestie πβ¨ππ¦πΈπ
π¦ 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