diff options
author | Christoph Hellwig <hch@lst.de> | 2019-03-03 18:40:36 +0300 |
---|---|---|
committer | Christoph Hellwig <hch@lst.de> | 2019-04-05 09:07:57 +0300 |
commit | 3ab3a0313cb8c50391d74e40fd46a3408d8e4de9 (patch) | |
tree | b9bdb0bda3a50d22e7b2a46b9aea199ea83bf63e /include/linux | |
parent | 9d9de535f385a8b3ba0e88ca0abf386c5704bbfc (diff) | |
download | linux-3ab3a0313cb8c50391d74e40fd46a3408d8e4de9.tar.xz |
block: add dma_map_bvec helper
Provide a nice little shortcut for mapping a single bvec.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Keith Busch <keith.busch@intel.com>
Reviewed-by: Sagi Grimberg <sagi@grimberg.me>
Reviewed-by: Chaitanya Kulkarni <chaitanya.kulkarni@wdc.com>
Diffstat (limited to 'include/linux')
-rw-r--r-- | include/linux/blkdev.h | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/include/linux/blkdev.h b/include/linux/blkdev.h index 74469a4dc0a1..4b85dc066264 100644 --- a/include/linux/blkdev.h +++ b/include/linux/blkdev.h @@ -644,6 +644,10 @@ static inline bool blk_account_rq(struct request *rq) #define rq_dma_dir(rq) \ (op_is_write(req_op(rq)) ? DMA_TO_DEVICE : DMA_FROM_DEVICE) +#define dma_map_bvec(dev, bv, dir, attrs) \ + dma_map_page_attrs(dev, (bv)->bv_page, (bv)->bv_offset, (bv)->bv_len, \ + (dir), (attrs)) + static inline bool queue_is_mq(struct request_queue *q) { return q->mq_ops; |