summaryrefslogtreecommitdiffstats
path: root/fs/xfs/xfs_bmap_util.h
diff options
context:
space:
mode:
authorChristoph Hellwig <hch@lst.de>2017-08-30 00:44:14 +0200
committerDarrick J. Wong <darrick.wong@oracle.com>2017-09-01 22:08:26 +0200
commite17a5c6f0e3609da83270f42698b1dfedde86f44 (patch)
tree06e618698006a524252781215dc293a832d59abf /fs/xfs/xfs_bmap_util.h
parentxfs: use xfs_iext_*_extent helpers in xfs_bmap_split_extent_at (diff)
downloadlinux-e17a5c6f0e3609da83270f42698b1dfedde86f44.tar.xz
linux-e17a5c6f0e3609da83270f42698b1dfedde86f44.zip
xfs: rewrite xfs_bmap_count_leaves using xfs_iext_get_extent
This avoids poking into the internals of the extent list. Also return the number of extents as the return value instead of an additional by reference argument, and make it available to callers outside of xfs_bmap_util.c Signed-off-by: Christoph Hellwig <hch@lst.de> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/xfs_bmap_util.h')
-rw-r--r--fs/xfs/xfs_bmap_util.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/fs/xfs/xfs_bmap_util.h b/fs/xfs/xfs_bmap_util.h
index 0cede1043571..0eaa81dc49be 100644
--- a/fs/xfs/xfs_bmap_util.h
+++ b/fs/xfs/xfs_bmap_util.h
@@ -70,6 +70,7 @@ int xfs_swap_extents(struct xfs_inode *ip, struct xfs_inode *tip,
xfs_daddr_t xfs_fsb_to_db(struct xfs_inode *ip, xfs_fsblock_t fsb);
+xfs_extnum_t xfs_bmap_count_leaves(struct xfs_ifork *ifp, xfs_filblks_t *count);
int xfs_bmap_count_blocks(struct xfs_trans *tp, struct xfs_inode *ip,
int whichfork, xfs_extnum_t *nextents,
xfs_filblks_t *count);