diff options
author | Andreas Gruenbacher <agruenba@redhat.com> | 2018-06-04 14:56:51 +0200 |
---|---|---|
committer | Bob Peterson <rpeterso@redhat.com> | 2018-06-04 14:56:51 +0200 |
commit | 628e366df11c0a61487522ec1d4bca5c77fe9083 (patch) | |
tree | fe32126aa08767b5621741b63b096af966604f9d /fs/gfs2/bmap.h | |
parent | gfs2: Remove ordered write mode handling from gfs2_trans_add_data (diff) | |
download | linux-628e366df11c0a61487522ec1d4bca5c77fe9083.tar.xz linux-628e366df11c0a61487522ec1d4bca5c77fe9083.zip |
gfs2: Iomap cleanups and improvements
Clean up gfs2_iomap_alloc and gfs2_iomap_get. Document how
gfs2_iomap_alloc works: it now needs to be called separately after
gfs2_iomap_get where necessary; this will be used later by iomap write.
Move gfs2_iomap_ops into bmap.c.
Introduce a new gfs2_iomap_get_alloc helper and use it in
fallocate_chunk: gfs2_iomap_begin will become unsuitable for fallocate
with proper iomap write support.
In gfs2_block_map and fallocate_chunk, zero-initialize struct iomap.
Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Signed-off-by: Bob Peterson <rpeterso@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.h')
-rw-r--r-- | fs/gfs2/bmap.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h index c3402fe00653..6b18fb323f0a 100644 --- a/fs/gfs2/bmap.h +++ b/fs/gfs2/bmap.h @@ -46,11 +46,13 @@ static inline void gfs2_write_calc_reserv(const struct gfs2_inode *ip, } } +extern const struct iomap_ops gfs2_iomap_ops; + extern int gfs2_unstuff_dinode(struct gfs2_inode *ip, struct page *page); extern int gfs2_block_map(struct inode *inode, sector_t lblock, struct buffer_head *bh, int create); -extern int gfs2_iomap_begin(struct inode *inode, loff_t pos, loff_t length, - unsigned flags, struct iomap *iomap); +extern int gfs2_iomap_get_alloc(struct inode *inode, loff_t pos, loff_t length, + struct iomap *iomap); extern int gfs2_extent_map(struct inode *inode, u64 lblock, int *new, u64 *dblock, unsigned *extlen); extern int gfs2_setattr_size(struct inode *inode, u64 size); |