From db074436f421967f4f30cfbb6fbc2a728f3e62b3 Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 15 Jul 2019 08:50:59 -0700 Subject: iomap: move the direct IO code into a separate file Move the direct IO code into a separate file so that we can group related functions in a single file instead of having a single enormous source file. Signed-off-by: Darrick J. Wong Reviewed-by: Christoph Hellwig --- include/linux/iomap.h | 7 +++++++ 1 file changed, 7 insertions(+) (limited to 'include') diff --git a/include/linux/iomap.h b/include/linux/iomap.h index 1df9ea187a9a..baa1e2d31f05 100644 --- a/include/linux/iomap.h +++ b/include/linux/iomap.h @@ -7,6 +7,7 @@ #include #include #include +#include struct address_space; struct fiemap_extent_info; @@ -69,6 +70,12 @@ struct iomap { const struct iomap_page_ops *page_ops; }; +static inline sector_t +iomap_sector(struct iomap *iomap, loff_t pos) +{ + return (iomap->addr + pos - iomap->offset) >> SECTOR_SHIFT; +} + /* * When a filesystem sets page_ops in an iomap mapping it returns, page_prepare * and page_done will be called for each page written to. This only applies to -- cgit v1.2.3