Re: [PATCH 32/36] xfs: fix minor bug in xfs_verify_agbno

Christoph Hellwig
2024-10-14T08:10:38Z

On Thu, Oct 10, 2024 at 06:10:00PM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <djwong@kernel.org>
>
> There's a minor bug in xfs_verify_agbno -- min_block ought to be the
> first agblock number in the AG that can be used by non-static metadata.
> Unfortunately, we set it to the last agblock of the static metadata.
> Fortunately this works due to the <= check, but this isn't technically
> correct.
>
> Instead, change the check to < and set it to the next agblock past the
> static metadata. This hasn't been an issue up to now, but we're going
> to move these things into the generic group struct, and this will cause
> problems with rtgroups, where min_block can be zero for an rtgroup.

I don't think this actually is a bug. The new version is nicer, but
for AGs that always have headers at the start the existing version
works perfectly fine. So maybe update the commit log a bit?

Otherwise looks good:

Reviewed-by: Christoph Hellwig <hch@lst.de>