block: set FOLL_PCI_P2PDMA in __bio_iov_iter_get_pages()
authorLogan Gunthorpe <logang@deltatee.com>
Fri, 21 Oct 2022 17:41:13 +0000 (11:41 -0600)
committerJens Axboe <axboe@kernel.dk>
Wed, 9 Nov 2022 18:29:21 +0000 (11:29 -0700)
commit5e3e3f2e15df46abcab1959f93f214f778b6ec49
tree6db106f3f6769207fca9f405578c1cfa5e93d12e
parent1567b49d1a4081ba7e1a0ff2dc39bc58c59f2a51
block: set FOLL_PCI_P2PDMA in __bio_iov_iter_get_pages()

When a bio's queue supports PCI P2PDMA, set FOLL_PCI_P2PDMA for
iov_iter_get_pages_flags(). This allows PCI P2PDMA pages to be passed
from userspace and enables the O_DIRECT path in iomap based filesystems
and direct to block devices.

Signed-off-by: Logan Gunthorpe <logang@deltatee.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: John Hubbard <jhubbard@nvidia.com>
Reviewed-by: Chaitanya Kulkarni <kch@nvidia.com>
Link: https://lore.kernel.org/r/20221021174116.7200-7-logang@deltatee.com
Signed-off-by: Jens Axboe <axboe@kernel.dk>
block/bio.c