xfs: inode recovery does not validate the recovered inode
authorDave Chinner <dchinner@redhat.com>
Thu, 8 Feb 2024 23:20:50 +0000 (15:20 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 16 Feb 2024 18:10:45 +0000 (19:10 +0100)
commitb28b234276a816bcf5e00af29b02e2c843f52ddb
treed95b23bb70c1713b3286877a4fa383568e79726e
parent5411625f8dded9347779927f80d131b91049b090
xfs: inode recovery does not validate the recovered inode

commit 038ca189c0d2c1570b4d922f25b524007c85cf94 upstream.

Discovered when trying to track down a weird recovery corruption
issue that wasn't detected at recovery time.

The specific corruption was a zero extent count field when big
extent counts are in use, and it turns out the dinode verifier
doesn't detect that specific corruption case, either. So fix it too.

Signed-off-by: Dave Chinner <dchinner@redhat.com>
Reviewed-by: "Darrick J. Wong" <djwong@kernel.org>
Signed-off-by: Chandan Babu R <chandanbabu@kernel.org>
Signed-off-by: Catherine Hoang <catherine.hoang@oracle.com>
Acked-by: Chandan Babu R <chandanbabu@kernel.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
fs/xfs/libxfs/xfs_inode_buf.c
fs/xfs/xfs_inode_item_recover.c