diff options
| author | 2018-05-09 10:02:01 -0700 | |
|---|---|---|
| committer | 2018-05-15 17:57:05 -0700 | |
| commit | 14861c47400b4a1669956d8b027fe4b7855e39f1 (patch) | |
| tree | 43c5f049a512128ed99e054fb94e10fea0b37e1c /fs/xfs/libxfs/xfs_ialloc_btree.c | |
| parent | xfs: refactor scrub transaction allocation function (diff) | |
| download | linux-rng-14861c47400b4a1669956d8b027fe4b7855e39f1.tar.xz linux-rng-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_ialloc_btree.c')
| -rw-r--r-- | fs/xfs/libxfs/xfs_ialloc_btree.c | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c index 367e9a0726e6..ba053a4c124f 100644 --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c @@ -608,3 +608,12 @@ xfs_finobt_calc_reserves( *used += tree_len; return 0; } + +/* Calculate the inobt btree size for some records. */ +xfs_extlen_t +xfs_iallocbt_calc_size( + struct xfs_mount *mp, + unsigned long long len) +{ + return xfs_btree_calc_size(mp->m_inobt_mnr, len); +} |
