]> git.baikalelectronics.ru Git - kernel.git/commit
libxfs: v3 inodes are only valid on crc-enabled filesystems
authorRoger Willcocks <roger@filmlight.ltd.uk>
Thu, 20 Oct 2016 04:48:38 +0000 (15:48 +1100)
committerDave Chinner <david@fromorbit.com>
Thu, 20 Oct 2016 04:48:38 +0000 (15:48 +1100)
commitd24ff2b97e5010d52498e38feb33b0ce6b3238ae
tree25f6467ff79b46d176c68b391d315226f9bf2383
parent3a9e96f1f1c2f5e8ab600e14ed5fca6a413c4488
libxfs: v3 inodes are only valid on crc-enabled filesystems

xfs_repair was not detecting that version 3 inodes are invalid for
for non-CRC filesystems. The result is specific inode corruptions go
undetected and hence aren't repaired if only the version number is
out of range.

The core of the problem is that the XFS_DINODE_GOOD_VERSION() macro
doesn't know that valid inode versions are dependent on a superblock
version number. Fix this in libxfs, and propagate the new function
out into the rest of xfsprogs to fix the issue.

[Darrick: port to kernel from xfsprogs]

Reported-by: Leslie Rhorer <lrhorer@mygrande.net>
Signed-off-by: Roger Willcocks <roger@filmlight.ltd.uk>
Reviewed-by: Dave Chinner <dchinner@redhat.com>
Signed-off-by: Dave Chinner <david@fromorbit.com>
fs/xfs/libxfs/xfs_format.h
fs/xfs/libxfs/xfs_inode_buf.c
fs/xfs/libxfs/xfs_inode_buf.h