bio_chain_and_submit(9)
π bio_chain_and_submit(9) π
okay bestie, so we're in the Kernel API Manual today and this page is about one little function that does a lot of quiet heavy lifting. it's giving "small but iconic". let's get into it β¨
πΈ NAME πΈ
bio_chain_and_submit β literally what it says on the tin: you submit a bio after you chain it onto another one. chain first, submit second, no cap π«Ά
π SYNOPSIS π
struct bio * bio_chain_and_submit (struct bio *prev , struct bio *new );
π¦ ARGUMENTS π¦
prevβ the bio you're gonna chain and submit. yes, it's doing both jobs, main character energy fr πnewβ the bio thatprevgets chained onto. it's the one being chained to, iykyk
β DESCRIPTION β
so here's the whole tea: if prev is non-NULL, you chain it to new and then submit it. that's it. that's the function. lowkey elegant, highkey useful π
and if prev is NULL? then there's nothing to chain and nothing getting submitted here β the condition is doing all the work, so pay attention to it π
π₯ RETURN π₯
returns new. just new. that's the whole return value, bestie β it hands you back the bio you passed in as new π
π SEE ALSO π
and now the friend group π β the kernel file ./block/bio.c is where this whole squad lives, and here's everyone:
bio_reset(9)bio_reuse(9)bio_chain(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)
ngl, that's a long guest list, but every single one of them earned their invite π go read bio_chain(9) next if you wanna see the chaining part on its own β it's the prequel π§
and that's the whole page!! this little darling comes to you from the source ./block, dated October 2026 β mwah, sending you off with a kiss and a struct bio * ππβ¨
π¦ 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