On Wed, Jun 28, 2023 at 10:48:36AM -0700, Darrick J. Wong wrote: > On Wed, Jun 28, 2023 at 08:44:08AM +1000, Dave Chinner wrote: > > From: Dave Chinner <dchinner@xxxxxxxxxx> > > @@ -653,9 +700,29 @@ xfs_efi_item_recover( > > fake.xefi_startblock = extp->ext_start; > > fake.xefi_blockcount = extp->ext_len; > > > > - xfs_extent_free_get_group(mp, &fake); > > - error = xfs_trans_free_extent(tp, efdp, &fake); > > - xfs_extent_free_put_group(&fake); > > + if (!requeue_only) { > > + xfs_extent_free_get_group(mp, &fake); > > + error = xfs_trans_free_extent(tp, efdp, &fake); > > + xfs_extent_free_put_group(&fake); > > + } > > + > > + /* > > + * If we can't free the extent without potentially deadlocking, > > + * requeue the rest of the extents to a new so that they get > > + * run again later with a new transaction context. > > + */ > > + if (error == -EAGAIN || requeue_only) { > > + error = xfs_free_extent_later(tp, fake.xefi_startblock, > > + fake.xefi_blockcount, > > + &XFS_RMAP_OINFO_ANY_OWNER, > > + fake.xefi_type); > > + if (!error) { > > + requeue_only = true; > > + error = 0; > > @error is already zero so this is redundant, right? Yes. Forgot to remove it when I changed that code to continue and have errors fall through to the common handling... > If yes then I'll remove the line on commit, > Reviewed-by: Darrick J. Wong <djwong@xxxxxxxxxx> Thanks. Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx