]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit - repair/dinode.c
xfs_repair: replace verify_inum with libxfs inode validators
authorDarrick J. Wong <darrick.wong@oracle.com>
Thu, 27 Feb 2020 19:22:19 +0000 (14:22 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Thu, 27 Feb 2020 19:22:19 +0000 (14:22 -0500)
commit017e979eb03f987105e5485fb21ad3788373eac6
tree7f392ec0eaa9bd1dd56d55e322a773895b94a94d
parent471f0ab6a957331787e4e386bfc2d74e6daafb89
xfs_repair: replace verify_inum with libxfs inode validators

Repair uses the verify_inum function to validate inode numbers that it
finds in the superblock and in directories.  libxfs now has validator
functions to cover that kind of thing, so remove verify_inum().  As a
side bonus, this means that we will flag directories that point to the
quota/realtime metadata inodes.

This fixes a regression found by fuzzing u3.sfdir3.hdr.parent.i4 to
lastbit (aka making a directory's .. point to the user quota inode) in
xfs/384.

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