]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commit
xfs_repair: clear_dinode should simply clear, not check contents
authorEric Sandeen <sandeen@redhat.com>
Wed, 1 Aug 2018 22:06:45 +0000 (17:06 -0500)
committerEric Sandeen <sandeen@redhat.com>
Wed, 1 Aug 2018 22:06:45 +0000 (17:06 -0500)
commit0724d0f4cb53bcf5a4a70877d9732d4bfc59a33b
tree9d80a0ef398ed0623affd7b1b3373bcd4b5e26f7
parent2e1bf6c51f662158d9824743f56a57b46cba2a49
xfs_repair: clear_dinode should simply clear, not check contents

Today clear_inode performs 2 separate tasks - it clears a disk inode
when the calling code detects an inconsistency, and it also validates
allocated-but-free inodes.  This leads to duplicated checks in the
former case, and requires comprehensive validation for the latter case.

Now that we're using xfs_dinode_verify to validate free inodes, there's
no reason to repeat all the checks inside clear_inode.  Drop them all and
simply clear it when told to do so.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Reviewed-by: Carlos Maiolino <cmaiolino@redhat.com>
Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
repair/dinode.c