summaryrefslogtreecommitdiff
path: root/include/linux
diff options
context:
space:
mode:
authorKeith Busch <kbusch@kernel.org>2025-08-13 18:31:45 +0300
committerJens Axboe <axboe@kernel.dk>2025-08-25 16:44:38 +0300
commit7a6fc1634cea6f220228a69b1c0210e6b8b1aaf0 (patch)
treec18ead2faefdb4bbe3dc6cf4707180a1f1924d27 /include/linux
parent1b237f190eb3d36f52dffe07a40b5eb210280e00 (diff)
downloadlinux-7a6fc1634cea6f220228a69b1c0210e6b8b1aaf0.tar.xz
blk-mq-dma: create blk_map_iter type
The req_iterator happens to have a similar fields to what the dma iterator needs, but we're not necessarily iterating a request's bi_io_vec. Create a new type that can be amended for additional future use. Signed-off-by: Keith Busch <kbusch@kernel.org> Reviewed-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Kanchan Joshi <joshi.k@samsung.com> Reviewed-by: Martin K. Petersen <martin.petersen@oracle.com> Link: https://lore.kernel.org/r/20250813153153.3260897-2-kbusch@meta.com Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux')
-rw-r--r--include/linux/blk-mq-dma.h7
1 files changed, 6 insertions, 1 deletions
diff --git a/include/linux/blk-mq-dma.h b/include/linux/blk-mq-dma.h
index c26a01aeae00..6a7e3828673d 100644
--- a/include/linux/blk-mq-dma.h
+++ b/include/linux/blk-mq-dma.h
@@ -5,6 +5,11 @@
#include <linux/blk-mq.h>
#include <linux/pci-p2pdma.h>
+struct blk_map_iter {
+ struct bvec_iter iter;
+ struct bio *bio;
+};
+
struct blk_dma_iter {
/* Output address range for this iteration */
dma_addr_t addr;
@@ -14,7 +19,7 @@ struct blk_dma_iter {
blk_status_t status;
/* Internal to blk_rq_dma_map_iter_* */
- struct req_iterator iter;
+ struct blk_map_iter iter;
struct pci_p2pdma_map_state p2pdma;
};