summaryrefslogtreecommitdiffstats
path: root/fs/xfs/libxfs/xfs_btree.h
diff options
context:
space:
mode:
authorDarrick J. Wong <darrick.wong@oracle.com>2016-09-19 10:25:20 +1000
committerDave Chinner <david@fromorbit.com>2016-09-19 10:25:20 +1000
commitc611cc0360cd924448c23ccd70ce8be703fcb4a6 (patch)
tree8b421e59d4ebc171b0d7038d957cfd2b824c8db3 /fs/xfs/libxfs/xfs_btree.h
parent4ed3f68792f6a9c21a290ae777565e7562a09653 (diff)
downloadlinux-stable-c611cc0360cd924448c23ccd70ce8be703fcb4a6.tar.gz
linux-stable-c611cc0360cd924448c23ccd70ce8be703fcb4a6.tar.bz2
linux-stable-c611cc0360cd924448c23ccd70ce8be703fcb4a6.zip
xfs: count the blocks in a btree
Provide a helper method to count the number of blocks in a short form btree. The refcount and rmap btrees need to know the number of blocks already in use to set up their per-AG block reservations during mount. Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> Reviewed-by: Christoph Hellwig <hch@lst.de> Signed-off-by: Dave Chinner <david@fromorbit.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree.h')
-rw-r--r--fs/xfs/libxfs/xfs_btree.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.h b/fs/xfs/libxfs/xfs_btree.h
index 1c148f5c5675..3f8556a5c2ad 100644
--- a/fs/xfs/libxfs/xfs_btree.h
+++ b/fs/xfs/libxfs/xfs_btree.h
@@ -519,4 +519,6 @@ typedef int (*xfs_btree_visit_blocks_fn)(struct xfs_btree_cur *cur, int level,
int xfs_btree_visit_blocks(struct xfs_btree_cur *cur,
xfs_btree_visit_blocks_fn fn, void *data);
+int xfs_btree_count_blocks(struct xfs_btree_cur *cur, xfs_extlen_t *blocks);
+
#endif /* __XFS_BTREE_H__ */