]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: convert to libxfs_verify_agbno
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 10 Jul 2020 19:35:45 +0000 (15:35 -0400)
committerEric Sandeen <sandeen@sandeen.net>
Fri, 10 Jul 2020 19:35:45 +0000 (15:35 -0400)
commitdcd6c2e1490ba5c59c14ca8ea843ca36048888b8
tree77d9c904e34f39dc4467cb88c5299e1ecdb26e9d
parent320cc3b263542e692c4978fb327efa591892ab37
xfs_repair: convert to libxfs_verify_agbno

Convert the homegrown verify_agbno callers to use the libxfs function,
as needed.  In some places we drop the "bno != 0" checks because those
conditionals are checking btree roots; btree roots should never be
zero if the corresponding feature bit is set; and repair skips the if
clause entirely if the feature bit is disabled.

In effect, this strengthens repair to validate that AG btree pointers
neither point to the AG headers nor past the end of the AG.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Christoph Hellwig <hch@lst.de>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/libxfs_api_defs.h
repair/dinode.c
repair/dinode.h
repair/scan.c