diff options
author | Dave Chinner <dchinner@redhat.com> | 2023-02-10 18:11:06 +0100 |
---|---|---|
committer | Dave Chinner <dchinner@redhat.com> | 2023-02-10 18:11:06 +0100 |
commit | 692b6cddeb65a5170c1e63d25b1ffb7822e80f7d (patch) | |
tree | f900390ee9a61274d1edd405cdf53f2c13e8b35b /fs/xfs/libxfs/xfs_bmap.c | |
parent | xfs: drop firstblock constraints from allocation setup (diff) | |
download | linux-692b6cddeb65a5170c1e63d25b1ffb7822e80f7d.tar.xz linux-692b6cddeb65a5170c1e63d25b1ffb7822e80f7d.zip |
xfs: t_firstblock is tracking AGs not blocks
The tp->t_firstblock field is now raelly tracking the highest AG we
have locked, not the block number of the highest allocation we've
made. It's purpose is to prevent AGF locking deadlocks, so rename it
to "highest AG" and simplify the implementation to just track the
agno rather than a fsbno.
Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: Allison Henderson <allison.henderson@oracle.com>
Reviewed-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/libxfs/xfs_bmap.c')
-rw-r--r-- | fs/xfs/libxfs/xfs_bmap.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/fs/xfs/libxfs/xfs_bmap.c b/fs/xfs/libxfs/xfs_bmap.c index 31a0738d017e..504fd69fe2c6 100644 --- a/fs/xfs/libxfs/xfs_bmap.c +++ b/fs/xfs/libxfs/xfs_bmap.c @@ -4192,7 +4192,7 @@ xfs_bmapi_minleft( { struct xfs_ifork *ifp = xfs_ifork_ptr(ip, fork); - if (tp && tp->t_firstblock != NULLFSBLOCK) + if (tp && tp->t_highest_agno != NULLAGNUMBER) return 0; if (ifp->if_format != XFS_DINODE_FMT_BTREE) return 1; @@ -6079,7 +6079,7 @@ xfs_bmap_finish_one( struct xfs_bmbt_irec *bmap = &bi->bi_bmap; int error = 0; - ASSERT(tp->t_firstblock == NULLFSBLOCK); + ASSERT(tp->t_highest_agno == NULLAGNUMBER); trace_xfs_bmap_deferred(tp->t_mountp, XFS_FSB_TO_AGNO(tp->t_mountp, bmap->br_startblock), |