summaryrefslogtreecommitdiffstats
path: root/fs/gfs2/bmap.h
diff options
context:
space:
mode:
authorBob Peterson <rpeterso@redhat.com>2017-02-16 16:27:16 +0100
committerAndreas Gruenbacher <agruenba@redhat.com>2017-10-31 14:26:33 +0100
commit3974320ca6aa68d479051f208d5c95afd1e47a4c (patch)
tree6ffea2a1d15f260142da64d7fa410baaa93b809b /fs/gfs2/bmap.h
parentGFS2: Make height info part of metapath (diff)
downloadlinux-3974320ca6aa68d479051f208d5c95afd1e47a4c.tar.xz
linux-3974320ca6aa68d479051f208d5c95afd1e47a4c.zip
GFS2: Implement iomap for block_map
This patch implements iomap for block mapping, and switches the block_map function to use it under the covers. The additional IOMAP_F_BOUNDARY iomap flag indicates when iomap has reached a "metadata boundary" and fetching the next mapping is likely to incur an additional I/O. This flag is used for setting the bh buffer boundary flag. Signed-off-by: Bob Peterson <rpeterso@redhat.com> Signed-off-by: Andreas Gruenbacher <agruenba@redhat.com>
Diffstat (limited to 'fs/gfs2/bmap.h')
-rw-r--r--fs/gfs2/bmap.h4
1 files changed, 4 insertions, 0 deletions
diff --git a/fs/gfs2/bmap.h b/fs/gfs2/bmap.h
index 81ded5e2aaa2..443cc182cf18 100644
--- a/fs/gfs2/bmap.h
+++ b/fs/gfs2/bmap.h
@@ -10,6 +10,8 @@
#ifndef __BMAP_DOT_H__
#define __BMAP_DOT_H__
+#include <linux/iomap.h>
+
#include "inode.h"
struct inode;
@@ -47,6 +49,8 @@ static inline void gfs2_write_calc_reserv(const struct gfs2_inode *ip,
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_extent_map(struct inode *inode, u64 lblock, int *new,
u64 *dblock, unsigned *extlen);
extern int gfs2_setattr_size(struct inode *inode, u64 size);