summaryrefslogtreecommitdiff
path: root/fs/xfs/libxfs/xfs_rmap.h
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-10-03 19:11:48 +0300
committerDarrick J. Wong <darrick.wong@oracle.com>2016-10-06 02:26:29 +0300
commitceeb9c832eeca5c1c2efc54a38f67283ccb60288 (patch)
tree9758e097e4b7ffcbca52b5689acc5588e83db920 /fs/xfs/libxfs/xfs_rmap.h
parent0e07c039bac5f6ce7e3bc512ab9efb4aaa76da94 (diff)
downloadlinux-ceeb9c832eeca5c1c2efc54a38f67283ccb60288.tar.xz
xfs: use interval query for rmap alloc operations on shared files
When it's possible for reverse mappings to overlap (data fork extents of files on reflink filesystems), use the interval query function to find the left neighbor of an extent we're trying to add; and be careful to use the lookup functions to update the neighbors and/or add new extents. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de>
Diffstat (limited to 'fs/xfs/libxfs/xfs_rmap.h')
-rw-r--r--fs/xfs/libxfs/xfs_rmap.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_rmap.h b/fs/xfs/libxfs/xfs_rmap.h
index 71cf99a4acba..789930599339 100644
--- a/fs/xfs/libxfs/xfs_rmap.h
+++ b/fs/xfs/libxfs/xfs_rmap.h
@@ -206,4 +206,11 @@ int xfs_rmap_finish_one(struct xfs_trans *tp, enum xfs_rmap_intent_type type,
xfs_fsblock_t startblock, xfs_filblks_t blockcount,
xfs_exntst_t state, struct xfs_btree_cur **pcur);
+int xfs_rmap_find_left_neighbor(struct xfs_btree_cur *cur, xfs_agblock_t bno,
+ uint64_t owner, uint64_t offset, unsigned int flags,
+ struct xfs_rmap_irec *irec, int *stat);
+int xfs_rmap_lookup_le_range(struct xfs_btree_cur *cur, xfs_agblock_t bno,
+ uint64_t owner, uint64_t offset, unsigned int flags,
+ struct xfs_rmap_irec *irec, int *stat);
+
#endif /* __XFS_RMAP_H__ */