Re: [PATCH 09/16] xfs_repair: convert to libxfs_verify_agbno

Christoph Hellwig
2020-05-09T17:18:32Z

On Sat, May 09, 2020 at 09:30:54AM -0700, Darrick J. Wong wrote:
> From: Darrick J. Wong <darrick.wong@oracle.com>
>
> Convert the homegrown verify_agbno callers to use the libxfs function,
> as needed.
>
> Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>

This looks mostly good, but there is one thing I wonder about:

> bno = be32_to_cpu(agf->agf_roots[XFS_BTNUM_BNO]);
> - if (bno != 0 && verify_agbno(mp, agno, bno)) {
> + if (libxfs_verify_agbno(mp, agno, bno)) {

Various of these block is non-zero check are going away. Did you
audit if they weren't used as intentional escapes in a few places?

Either way this should probably be documented in the changelog.