bio_endio(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

🌸 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 a bio. 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