diff options
author | Dave Chinner <dchinner@redhat.com> | 2022-07-07 19:13:21 +1000 |
---|---|---|
committer | Dave Chinner <david@fromorbit.com> | 2022-07-07 19:13:21 +1000 |
commit | 36029dee382a20cf515494376ce9f0d5949944eb (patch) | |
tree | 7860b321d990485b43d7f663a1c1b2a796beb1ba /fs/xfs/libxfs/xfs_ialloc_btree.c | |
parent | 3829c9a10fc7da40194ec9860df8c557c2b86ed8 (diff) | |
download | linux-36029dee382a20cf515494376ce9f0d5949944eb.tar.gz linux-36029dee382a20cf515494376ce9f0d5949944eb.tar.bz2 linux-36029dee382a20cf515494376ce9f0d5949944eb.zip |
xfs: make is_log_ag() a first class helper
We check if an ag contains the log in many places, so make this
a first class XFS helper by lifting it to fs/xfs/libxfs/xfs_ag.h and
renaming it xfs_ag_contains_log(). The convert all the places that
check if the AG contains the log to use this helper.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_ialloc_btree.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_ialloc_btree.c | 3 |
1 files changed, 1 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_ialloc_btree.c b/fs/xfs/libxfs/xfs_ialloc_btree.c index 2e0ff99d9f0b..8c83e265770c 100644 --- a/fs/xfs/libxfs/xfs_ialloc_btree.c +++ b/fs/xfs/libxfs/xfs_ialloc_btree.c @@ -697,8 +697,7 @@ xfs_inobt_max_size( * never be available for the kinds of things that would require btree * expansion. We therefore can pretend the space isn't there. */ - if (mp->m_sb.sb_logstart && - XFS_FSB_TO_AGNO(mp, mp->m_sb.sb_logstart) == pag->pag_agno) + if (xfs_ag_contains_log(mp, pag->pag_agno)) agblocks -= mp->m_sb.sb_logblocks; return xfs_btree_calc_size(M_IGEO(mp)->inobt_mnr, |