bio_init_clone(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’… bio_init_clone(9) β€” like, the Kernel API Manual page, bestie

okay so we're in the Kernel API Manual today and the function we're stanning is bio_init_clone. yes, it's a real one, and yes, it's giving "I clone bios and I share biovecs" main character energy. let me walk you through it 🫢


✨ NAME ✨

bio_init_clone β€” clones a bio, and the clone shares the original bio's biovec. that's the whole vibe, periodt.


🌸 SYNOPSIS 🌸

int bio_init_clone (struct block_device *bdev , struct bio *bio , struct
bio *bio_src , gfp_t gfp );

πŸŽ€ ARGUMENTS πŸŽ€

  • bdev β€” the block_device you're cloning onto. where it's going πŸ’–
  • bio β€” the bio you're cloning into. the destination, the new home, the fresh fit ✨
  • bio_src β€” the bio you're cloning from. the original, the blueprint, the source material πŸ‘‘
  • gfp β€” the allocation priority. how hard you're allowed to try to get memory 🧚

πŸ¦‹ DESCRIPTION πŸ¦‹

So what it actually does: it initializes a new bio in memory that you, the caller, provide β€” and that new bio is a clone of bio_src. no cap, you're handing it the space.

And the reuse rules? The same bio_vecs reuse and bio lifetime rules as bio_alloc_clone apply. that's it, that's the tea β˜• β€” different function, same rules, iykyk.


πŸ”₯ SEE ALSO πŸ”₯

the whole friend group shows up here, and honestly? iconic. all of these are from the kernel file ./block/bio.c:

like, the entire roster. go read them, I'll wait πŸ’…


and that's the page!! this lil beauty lives in the source ./block, and it's dated October 2026, and it's filed under bio_init_clone(9) β€” so if you forget where you found it, it's literally right there in the footer. mwah πŸ’– bye bestie, go clone some bios responsibly πŸŽ€

πŸ“¦ where this page comes from