On Wed, Dec 17, 2025 at 07:06:47AM +0100, Christoph Hellwig wrote:
> Restructure blk_crypto_fallback_bio_prep so that it always submits the
> encrypted bio instead of passing it back to the caller, which allows
> to simplify the calling conventions for blk_crypto_fallback_bio_prep and
> blk_crypto_bio_prep so that they never have to return a bio, and can
> use a true return value to indicate that the caller should submit the
> bio, and false that the blk-crypto code consumed it.
> 
> The submission is handled by the on-stack bio list in the current
> task_struct by the block layer and does not cause additional stack
> usage or major overhead.  It also prepares for the following optimization
> and fixes for the blk-crypto fallback write path.
> 
> Signed-off-by: Christoph Hellwig <[email protected]>
> ---
>  block/blk-core.c            |  2 +-
>  block/blk-crypto-fallback.c | 70 +++++++++++++++++--------------------
>  block/blk-crypto-internal.h | 19 ++++------
>  block/blk-crypto.c          | 53 ++++++++++++++--------------
>  4 files changed, 67 insertions(+), 77 deletions(-)

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

- Eric

Reply via email to