Re: [RFC 1/6] block: refuse a dma-buf bio that carries a crypto context
From: Christoph Hellwig
Date: Fri Nov 06 2026 - 05:41:44 EST
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.