bio_trim(9)
π bio_trim(9) β the Kernel API Manual, but make it cute β¨
okay bestie, so you're looking at bio_trim, and manual page bio_trim(9). it lives in the Kernel API Manual and honestly? it's a lil icon. lowkey does exactly what it says on the tin: it trims a bio. slay.
πΈ SYNOPSIS πΈ
void bio_trim (struct bio *bio , sector_t offset , sector_t size );
that's the whole vibe. one function, three args, zero drama. periodt.
π ARGUMENTS π
bioβ the bio we're about to trim, bestie. this is the main character of the operation, no cap.offsetβ the number of sectors we're trimming from the front ofbio. like cutting the crusts off a sandwich. π₯ͺsizeβ the size we want to trimbioto, measured in sectors. this is the goal, the dream, the final form. β¨
π DESCRIPTION π
so the tea is: this function is typically used for bios that are cloned and then submitted to the underlying device in parts. it's giving "break it down and ship it" energy. like slicing a pizza and handing out the pieces one by one. π ikyk.
it's not out here doing anything wild β it just trims. iconic, honestly. π₯
π SEE ALSO π
okay so there are a lot of friends in this kernel friend group, and they all deserve a moment, so let's do a lil roll call:
- Kernel file
./block/bio.c, plus these absolute legends: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_endio(9)bio_split(9)bioset_init(9)
every single one. we don't leave anyone out of the group chat. π«Ά
and yes, this whole thing belongs to the ./block fam, dated October 2026. consider that the lil timestamp on the story. β
stay trimmed, stay slay, and remember: the vibes are immutable. π¦π
π¦ 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