On Wed, Jun 14, 2023 at 08:32:35PM -0700, Darrick J. Wong wrote: > On Thu, Jun 15, 2023 at 11:41:59AM +1000, Dave Chinner wrote: > > From: Dave Chinner <dchinner@xxxxxxxxxx> > > > > To avoid blocking in xfs_extent_busy_flush() when freeing extents > > and the only busy extents are held by the current transaction, we > > need to pass the XFS_ALLOC_FLAG_FREEING flag context all the way > > into xfs_extent_busy_flush(). > > > > Signed-off-by: Dave Chinner <dchinner@xxxxxxxxxx> > > --- > > fs/xfs/libxfs/xfs_alloc.c | 96 +++++++++++++++++++++------------------ > > fs/xfs/libxfs/xfs_alloc.h | 2 +- > > fs/xfs/xfs_extent_busy.c | 3 +- > > fs/xfs/xfs_extent_busy.h | 2 +- > > 4 files changed, 56 insertions(+), 47 deletions(-) > > > > diff --git a/fs/xfs/libxfs/xfs_alloc.c b/fs/xfs/libxfs/xfs_alloc.c > > index c20fe99405d8..11bd0a1756a1 100644 > > --- a/fs/xfs/libxfs/xfs_alloc.c > > +++ b/fs/xfs/libxfs/xfs_alloc.c > > @@ -1536,7 +1536,8 @@ xfs_alloc_ag_vextent_lastblock( > > */ > > STATIC int > > xfs_alloc_ag_vextent_near( > > - struct xfs_alloc_arg *args) > > + struct xfs_alloc_arg *args, > > + uint32_t alloc_flags) > > Is some bot going to complain about the uint32_t here vs the unsigned > int in xfs_extent_busy_flush? Huh. I thought I fixed that to use uint32_t all the way through. Oooh, I fixed that in a later patch. Oops, my bad, I'll update it. > Just to check my grokking here -- it's the ALLOC_FLAG_FREEING from > xfs_free_extent_fix_freelist that we need to pass all the way to the > bottom of the allocator? Yes. It needs to propagate through xfs_alloc_fix_freelist() into freelist block allocation... > If the answers are 'no' and 'yes', then > Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> Thanks! -Dave. -- Dave Chinner david@xxxxxxxxxxxxx