summaryrefslogtreecommitdiff
path: root/drivers/md
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2026-10-27 07:46:05 -1000
committerLinus Torvalds <torvalds@linux-foundation.org>2026-10-27 07:46:05 -1000
commited02f4f7ad9b5dabae2118e642cbbafe7dc9bb62 (patch)
tree297a798f9c58025b40247523470f5050faf08b2c /drivers/md
parentd135ab453a7400a34930bdda1ef4bdc8acfac80e (diff)
parent45b716456dd99488a0cef58482120dc0474aa696 (diff)
Merge tag 'for-7.4/io_uring-dmabuf-20261023' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux
Pull io_uring dma-buf support from Jens Axboe: "This adds native dma-buf support to the I/O path, exposed through io_uring. It's been in development for a while and should be ready to go now. - dma-buf file I/O infrastructure: a dma_buf_io_ctx created through a new ->init_dma_buf_io_ctx file operation, and a dma_buf_io_map holding the device DMA mapping. The two are split so a mapping can be invalidated and re-established underneath a live context, with the map counting in-flight requests so it can be torn down safely. - A new iov_iter type for dmabuf maps, and a dma map backed bio type for the block layer, with raw block device support on top. - nvme-pci backend implementing dma-buf backed requests, including SGL support. - io_uring dmabuf backed registered buffers, built on a reworked buffer registration structure with an extended update path, regbuf import flags, an uncloneable flag for buffer types that can't be cloned, and cloning support for registered dma-bufs" * tag 'for-7.4/io_uring-dmabuf-20261023' of git://git.kernel.org/pub/scm/linux/kernel/git/axboe/linux: io_uring/dma-buf: don't fail fixed buffers without dma-buf support nvme-pci: detach dma-bufs only on removal block: reject dma-bufs larger than 4GiB io_uring/dma-buf: allow cloning registered dma-bufs dma-buf-io: document dma_buf_io_init_map dma-buf-io: fix typos in kernel docs block: fix indention for dma-buf checks io_uring/rsrc: add dmabuf backed registered buffers io_uring/rsrc: add regbuf import flags io_uring/rsrc: add uncloneable regbuf flag io_uring/rsrc: extend buffer update io_uring/rsrc: introduce buf registration structure nvme-pci: add SGL support for the dmabuf path nvme-pci: implement dma-buf backed requests nvme-pci: rename nvme_pci_sgl_set_data to nvme_pci_dma_iter_set_sgl block: add dma-buf support for raw bdev block: introduce dma map backed bio type block: always adjust bi_offset on bio_advance_iter iov_iter: add iterator type for dmabuf maps dma-buf: introduce initial file I/O infrastructure
Diffstat (limited to 'drivers/md')
-rw-r--r--drivers/md/dm-io-rewind.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/md/dm-io-rewind.c b/drivers/md/dm-io-rewind.c
index 04f3fc8aeb6f..b22719c6411c 100644
--- a/drivers/md/dm-io-rewind.c
+++ b/drivers/md/dm-io-rewind.c
@@ -113,10 +113,12 @@ static inline void dm_bio_rewind_iter(const struct bio *bio,
iter->bi_sector -= bytes >> 9;
/* No advance means no rewind */
- if (bio_no_advance_iter(bio))
+ if (bio_no_advance_iter(bio)) {
iter->bi_size += bytes;
- else
+ iter->bi_offset -= bytes;
+ } else {
dm_bvec_iter_rewind(bio->bi_io_vec, iter, bytes);
+ }
}
/**