diff options
author | Logan Gunthorpe <logang@deltatee.com> | 2022-10-21 11:41:10 -0600 |
---|---|---|
committer | Jens Axboe <axboe@kernel.dk> | 2022-11-09 11:29:20 -0700 |
commit | d82076403cef7fcd1e7617c9db48bf21ebdc1f9c (patch) | |
tree | e008e755a4b7db705d6b6c28d15d8be5bba65f4c /include/linux/uio.h | |
parent | 4003f107fa2eabb0aab90e37a1ed7b74c6f0d132 (diff) | |
download | linux-stable-d82076403cef7fcd1e7617c9db48bf21ebdc1f9c.tar.gz linux-stable-d82076403cef7fcd1e7617c9db48bf21ebdc1f9c.tar.bz2 linux-stable-d82076403cef7fcd1e7617c9db48bf21ebdc1f9c.zip |
iov_iter: introduce iov_iter_get_pages_[alloc_]flags()
Add iov_iter_get_pages_flags() and iov_iter_get_pages_alloc_flags()
which take a flags argument that is passed to get_user_pages_fast().
This is so that FOLL_PCI_P2PDMA can be passed when appropriate.
Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Link: https://lore.kernel.org/r/20221021174116.7200-4-logang@deltatee.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
Diffstat (limited to 'include/linux/uio.h')
-rw-r--r-- | include/linux/uio.h | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/include/linux/uio.h b/include/linux/uio.h index 2e3134b14ffd..9ede533ce64c 100644 --- a/include/linux/uio.h +++ b/include/linux/uio.h @@ -247,8 +247,14 @@ void iov_iter_pipe(struct iov_iter *i, unsigned int direction, struct pipe_inode void iov_iter_discard(struct iov_iter *i, unsigned int direction, size_t count); void iov_iter_xarray(struct iov_iter *i, unsigned int direction, struct xarray *xarray, loff_t start, size_t count); +ssize_t iov_iter_get_pages(struct iov_iter *i, struct page **pages, + size_t maxsize, unsigned maxpages, size_t *start, + unsigned gup_flags); ssize_t iov_iter_get_pages2(struct iov_iter *i, struct page **pages, size_t maxsize, unsigned maxpages, size_t *start); +ssize_t iov_iter_get_pages_alloc(struct iov_iter *i, + struct page ***pages, size_t maxsize, size_t *start, + unsigned gup_flags); ssize_t iov_iter_get_pages_alloc2(struct iov_iter *i, struct page ***pages, size_t maxsize, size_t *start); int iov_iter_npages(const struct iov_iter *i, int maxpages); |