On Wed, Dec 10, 2025 at 04:23:38PM +0100, Christoph Hellwig wrote:
> +To submit a bio that uses inline encryption, users must call
> +``blk_crypto_submit_bio()`` instead of the usual ``submit_bio()``.  This will
> +submit the bio to the underlying driver if it supports inline crypto, or else
> +call the blk-crypto fallback routines before submitting normal bios to the
> +underlying drivers.

Maybe worth mentioning that submit_bio() still works if
blk-crypto-fallback support isn't needed?  I think device-mapper relies
on that when using targets with DM_TARGET_PASSES_CRYPTO on block devices
with hardware inline encryption support.  The original submitter uses
blk_crypto_submit_bio(), but the device-mapper layer doesn't, which is
okay because the fallback (if needed) would have been done already.

> +/**
> + * blk_crypto_submit_bio - Submit a bio using inline encryption

"bio using inline encryption" => "bio that may have a crypto context"
(or "bio that may be using inline encryption")

> + * @bio: bio to submit
> + *
> + * If @bio has not crypto context, or the crypt context attached to @bio is

not => no

Besides these documentation issues it looks okay though.

Reviewed-by: Eric Biggers <[email protected]>

- Eric

Reply via email to