Re: [RFC 1/6] block: refuse a dma-buf bio that carries a crypto context
From: Mengmeng Zhao
Date: Sun Nov 08 2026 - 21:53:18 EST
On 11/6/26 18:41, Christoph Hellwig wrote:
> On Thu, Nov 05, 2026 at 02:58:42PM +0800, Mengmeng Zhao wrote:
>> + /* a dma-buf bio has no pages for integrity work or contents crypto */
>> if (unlikely(op_is_dmabuf(bio->bi_opf) &&
>> - bdev_has_integrity_csum(bio->bi_bdev))) {
>> + (bdev_has_integrity_csum(bio->bi_bdev) ||
>> + bio_has_crypt_ctx(bio)))) {
>
> This could really use a factored helper explaining all the refusals.
> And maybe we should use the chance to sit back and think what else
> would blow up and add it there as well.
>
Hi Christoph, thanks for the review. I will extract a helper in V2 soon.
There are several buffered io fallbacks, it's really necessary to discuss
how to avoid these. Glad to join it.