diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-07-15 08:50:59 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-07-17 07:16:00 -0700 |
commit | db074436f421967f4f30cfbb6fbc2a728f3e62b3 (patch) | |
tree | e4b7ada3652978fc7c8d9285660a34b3be1a5c36 /include/linux/iomap.h | |
parent | 56a178981d47075f6fe5e1c4de77036c821d2877 (diff) |
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 <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'include/linux/iomap.h')
-rw-r--r-- | include/linux/iomap.h | 7 |
1 files changed, 7 insertions, 0 deletions
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 <linux/mm.h> #include <linux/types.h> #include <linux/mm_types.h> +#include <linux/blkdev.h> 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 |