Re: [PATCH 01/12] xfs: make sure aglen never goes negative in xfs_refcount_adjust_extents

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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



[Index of Archives]     [XFS Filesystem Development (older mail)]     [Linux Filesystem Development]     [Linux Audio Users]     [Yosemite Trails]     [Linux Kernel]     [Linux RAID]     [Linux SCSI]


  Powered by Linux