blk_crypto_submit_bio(9)
π¦ blk_crypto_submit_bio(9) π¦
okay so bestie, welcome to the Kernel API Manual β yes we're literally in the kernel now, hold my iced coffee π
this one's blk_crypto_submit_bio, and it's the function that submits a bio that may have a crypto context. may!! like it's not even committed to the bit. iconic honestly.
β¨ NAME β¨
blk_crypto_submit_bio β submit a bio that may have a crypto context π₯
β¨ SYNOPSIS β¨
void blk_crypto_submit_bio (struct bio *bio );
β¨ ARGUMENTS β¨
bioβ the bio to submit, bestie. that's it. that's the argument. she's simple, she's direct, we love her π«Ά
β¨ DESCRIPTION β¨
okay so here's the tea, and it's actually kind of a fork-in-the-road situation πΈ
Path one: if bio has no crypto context, or the crypt context attached to bio is supported by the underlying device's inline encryption hardware, then we just submit bio. that's it. no drama, no detour, straight to the device. slay, no cap β¨
Path two: otherwise β and this is the main character moment β we try to perform the en/decryption for this bio by falling back to the kernel crypto API. π§
and that fallback splits again depending on direction, so let me break it down:
- for encryption β this means submitting newly allocated bios for the encrypted payload, while keeping back the source bio until they complete. like, the original bio is waiting in the group chat until everyone else finishes typing π
- for reads β the decryption happens in-place by a hooked in completion handler. no extra bios, she just handles it herself on the way out π
so yeah, that's the whole vibe. lowkey elegant, highkey doing a lot of work back there π₯
β¨ SEE ALSO β¨
- Kernel file
./include/linux/blk-crypto.h struct blk_crypto_config(9)struct blk_crypto_key(9)struct bio_crypt_ctx(9)bio_crypt_clone(9)
go read them, iykyk ππ
and that's the page, bestie π this came to you from ./include/linux, dated October 2026 β mwah, take care, drink water, and don't submit bios without checking your crypto context first πβ¨π¦
π¦ 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