Re: [PATCH v9 05/13] block: add dma-buf support for raw bdev
From: Pavel Begunkov
Date: Tue Oct 13 2026 - 17:47:06 EST
On 10/8/26 13:27, Anuj Gupta/Anuj Gupta wrote:
On 10/7/2026 7:12 AM, Pavel Begunkov wrote:
+static int blkdev_init_dma_buf_io_ctx(struct file *file,
+ struct dma_buf_io_ctx *ctx)
+{
+ struct block_device *bdev = file_bdev(file);
+ struct gendisk *disk = bdev->bd_disk;
+
+ if (!(file->f_flags & O_DIRECT))
+ return -EINVAL;
+ if (!disk->fops->init_dma_buf_io_ctx)
+ return -EOPNOTSUPP;
dma-buf doesn't work with PI: bi_dmabuf_map aliases bi_io_vec, and
blk_integrity_iterate() walks it as bvecs to generate/verify the
checksum. rw-dmabuf liburing test hangs on a PI enabled NVMe. Something
like below is needed:
Thanks, I already took it into v10! There is some some confusion
with the branches, but will get incorporated in either case.
--
Pavel Begunkov