bio_endio(9)
πΈ bio_endio β okay so this is the bio_endio(9) glow-up, straight out of the Kernel API Manual π
β¨ NAME β¨
bio_endio β bestie, this is the one that ends I/O on a bio. periodt.
β¨ SYNOPSIS β¨
void bio_endio (struct bio *bio );
β¨ ARGUMENTS β¨
bioβ it's abio. that's the whole vibe. π¦ (the manpage literally just says "bio" and honestly? iconic minimalism.)
β¨ DESCRIPTION β¨
okay so bio_endio will end I/O on the whole bio. the entire thing. no crumbs left. π
bio_endio is, like, the preferred way to end I/O on a bio β the main character method, if you will. and this part is a warning bestie, so pay attention: no one should call bi_end_io directly on a bio unless they own it and thus know that it has an end_io function. like, don't just walk up to somebody else's bi_end_io and start calling it. that's not your business. π
here's the cute part: bio_endio can be called several times on a bio that has been chained using bio_chain. and the ->bi_end_io function? it will only be called the last time. so it's giving "you can knock as many times as you want, but the door only opens on the final knock." π₯
ngl, that chained-bio behavior is the whole reason this function is the nice one β multiple calls, one actual ->bi_end_io callback. slay.
β¨ SEE ALSO β¨
Kernel file ./block/bio.c, and literally the entire bio friend group: 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), bdev_rw_virt(9), bio_copy_data(9), bio_split(9), bio_trim(9), bioset_init(9). go read them, iykyk πβ¨
aaaand that's the page! π«Ά this lil baddie lives in ./block and it's dated October 2026, filed under bio_endio(9) β mwah, go end some I/O responsibly, 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