On Thu, Oct 27, 2022 at 10:14:09AM -0700, Darrick J. Wong wrote: > From: Darrick J. Wong <djwong@xxxxxxxxxx> > > Prior to calling xfs_refcount_adjust_extents, we trimmed agbno/aglen > such that the end of the range would not be in the middle of a refcount > record. If this is no longer the case, something is seriously wrong > with the btree. Bail out with a corruption error. > > Signed-off-by: Darrick J. Wong <djwong@xxxxxxxxxx> > --- > fs/xfs/libxfs/xfs_refcount.c | 20 +++++++++++++++++--- > 1 file changed, 17 insertions(+), 3 deletions(-) Looks reasonable - I can't see any reason why we'd want to look up the next extent if we've already finished processing the current range. Reviewed-by: Dave Chinner <dchinner@xxxxxxxxxx> -- Dave Chinner david@xxxxxxxxxxxxx