bio_crypt_clone(9)

πŸ“¦ version 7.3.1, in nixpkgs unstable

πŸ’– NAME πŸ’–

okay bestie, this is bio_crypt_clone(9) from the Kernel API Manual β€” yes, we're in kernel-API land and it's giving very specific little helper energy πŸ’…

bio_crypt_clone β€” clone bio encryption context. That's the whole name, no cap.


✨ SYNOPSIS ✨

int bio_crypt_clone (struct bio *dst , struct bio *src , gfp_t gfp_mask
       );

πŸŽ€ ARGUMENTS πŸŽ€

  • dst β€” the destination bio, aka where the clone is headed 🫢
  • src β€” the source bio, aka the one we're copying from πŸ‘€
  • gfp_mask β€” the memory allocation flags, fr fr

🌸 DESCRIPTION 🌸

If src has an encryption context, this function clones it to dst. That's it. That's the lore. iconic minimal behavior ✨


πŸ¦‹ RETURN πŸ¦‹

  • 0 on success πŸŽ‰
  • -ENOMEM if out of memory 😭

And listen bestie: -ENOMEM is only possible if gfp_mask doesn't include __GFP_DIRECT_RECLAIM β€” that's the exact caveat, don't forget it πŸ’€


πŸ‘‘ SEE ALSO πŸ‘‘

go read these besties too:

  • Kernel file ./include/linux/blk-crypto.h
  • struct blk_crypto_config(9)
  • struct blk_crypto_key(9)
  • struct bio_crypt_ctx(9)
  • blk_crypto_submit_bio(9)

that's the whole page, bestie πŸ’… β€” source/version: ./include/linux, dated October 2026. byeee 🫢🌈

πŸ“¦ where this page comes from