diff options
author | Christoph Hellwig <hch@lst.de> | 2019-10-17 22:12:19 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-10-21 17:51:59 +0200 |
commit | ab08b01ec0a205d9c98e712eb504c850a51e6fdb (patch) | |
tree | 96e339e6e940bc3fb38daa296060af9efd380617 /fs/iomap | |
parent | iomap: warn on inline maps in iomap_writepage_map (diff) | |
download | linux-ab08b01ec0a205d9c98e712eb504c850a51e6fdb.tar.xz linux-ab08b01ec0a205d9c98e712eb504c850a51e6fdb.zip |
iomap: move struct iomap_page out of iomap.h
Now that all the writepage code is in the iomap code there is no
need to keep this structure public.
Signed-off-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/iomap')
-rw-r--r-- | fs/iomap/buffered-io.c | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/fs/iomap/buffered-io.c b/fs/iomap/buffered-io.c index 901c1a799238..b5ff54fddf1f 100644 --- a/fs/iomap/buffered-io.c +++ b/fs/iomap/buffered-io.c @@ -21,6 +21,23 @@ #include "../internal.h" +/* + * Structure allocated for each page when block size < PAGE_SIZE to track + * sub-page uptodate status and I/O completions. + */ +struct iomap_page { + atomic_t read_count; + atomic_t write_count; + DECLARE_BITMAP(uptodate, PAGE_SIZE / 512); +}; + +static inline struct iomap_page *to_iomap_page(struct page *page) +{ + if (page_has_private(page)) + return (struct iomap_page *)page_private(page); + return NULL; +} + static struct bio_set iomap_ioend_bioset; static struct iomap_page * |