diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-09 19:02:01 +0200 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2018-05-16 02:57:05 +0200 |
commit | 14861c47400b4a1669956d8b027fe4b7855e39f1 (patch) | |
tree | 43c5f049a512128ed99e054fb94e10fea0b37e1c /fs/xfs/libxfs/xfs_btree.c | |
parent | xfs: refactor scrub transaction allocation function (diff) | |
download | linux-14861c47400b4a1669956d8b027fe4b7855e39f1.tar.xz linux-14861c47400b4a1669956d8b027fe4b7855e39f1.zip |
xfs: add helpers to calculate btree size
Add a bunch of helper functions that calculate the sizes of various
btrees. These will be used to repair btrees and btree headers.
Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Diffstat (limited to 'fs/xfs/libxfs/xfs_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_btree.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_btree.c b/fs/xfs/libxfs/xfs_btree.c index ac7d66427e42..2a8e01a05631 100644 --- a/fs/xfs/libxfs/xfs_btree.c +++ b/fs/xfs/libxfs/xfs_btree.c @@ -4836,14 +4836,14 @@ xfs_btree_query_all( * Calculate the number of blocks needed to store a given number of records * in a short-format (per-AG metadata) btree. */ -xfs_extlen_t +unsigned long long xfs_btree_calc_size( uint *limits, unsigned long long len) { int level; int maxrecs; - xfs_extlen_t rval; + unsigned long long rval; maxrecs = limits[0]; for (level = 0, rval = 0; len > 1; level++) { |