summaryrefslogtreecommitdiffstats
path: root/include/linux/iomap.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2018-06-19 15:10:57 -0700
committerDarrick J. Wong <darrick.wong@oracle.com>2018-06-19 15:10:57 -0700
commit72b4daa241295440f98e80ae21294a67b27ca091 (patch)
treeb9a81093b52ce764bc8f2d76296c157ddeacb752 /include/linux/iomap.h
parente184fde6f3f5353040dd4b5637f823fc87436e55 (diff)
downloadblackbird-obmc-linux-72b4daa241295440f98e80ae21294a67b27ca091.tar.gz
blackbird-obmc-linux-72b4daa241295440f98e80ae21294a67b27ca091.zip
iomap: add an iomap-based readpage and readpages implementation
Simply use iomap_apply to iterate over the file and a submit a bio for each non-uptodate but mapped region and zero everything else. Note that as-is this can not be used for file systems with a blocksize smaller than the page size, but that support will be added later. Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'include/linux/iomap.h')
-rw-r--r--include/linux/iomap.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/iomap.h b/include/linux/iomap.h
index 1f36523d448a..30d314407f66 100644
--- a/include/linux/iomap.h
+++ b/include/linux/iomap.h
@@ -99,6 +99,9 @@ struct iomap_ops {
ssize_t iomap_file_buffered_write(struct kiocb *iocb, struct iov_iter *from,
const struct iomap_ops *ops);
+int iomap_readpage(struct page *page, const struct iomap_ops *ops);
+int iomap_readpages(struct address_space *mapping, struct list_head *pages,
+ unsigned nr_pages, const struct iomap_ops *ops);
int iomap_file_dirty(struct inode *inode, loff_t pos, loff_t len,
const struct iomap_ops *ops);
int iomap_zero_range(struct inode *inode, loff_t pos, loff_t len,
OpenPOWER on IntegriCloud