Re: [PATCH 7/9] blk-crypto: handle the fallback above the block layer

Christoph Hellwig
2025-11-14T05:56:47Z

On Thu, Nov 13, 2025 at 04:37:38PM -0800, Eric Biggers wrote:
> This omits some important details. Maybe:
>
> /*
> * bio READ case: Set up a fallback crypt context in the bio's bi_private, clear
> * the bio's original crypt context, and set bi_end_io appropriately to trigger
> * decryption when the bio is ended. Returns true if bio submission should
> * continue, or false if aborted with bio_endio already called.
> */

I'll incorporate it.

> > - */
> > -bool __blk_crypto_bio_prep(struct bio **bio_ptr)
> > +bool __blk_crypto_submit_bio(struct bio *bio)
>
> Similarly, this could at least use a comment about what the return value
> means. It's true if the caller should continue with submission, or
> false if blk-crypto took ownership of the bio (either by completing the
> bio right away or by arranging for it to be completed later).

Ok.