xfs: don't treat unknown di_flags2 as corruption in scrub
xchk_inode_flags2() currently treats any di_flags2 values that the running kernel doesn't recognize as corruption, and calls xchk_ino_set_corrupt() if they are set. However, it's entirely possible that these flags were set in some newer kernel and are quite valid, but ignored in this kernel. (Validators don't care one bit about unknown di_flags2.) Call xchk_ino_set_warning instead, because this may or may not actually indicate a problem. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Dave Chinner <david@fromorbit.com>
This commit is contained in:
committed by
Dave Chinner
parent
2863c2ebc4
commit
f369a13cea
@@ -126,6 +126,7 @@ xchk_inode_flags(
|
||||
{
|
||||
struct xfs_mount *mp = sc->mp;
|
||||
|
||||
/* di_flags are all taken, last bit cannot be used */
|
||||
if (flags & ~XFS_DIFLAG_ANY)
|
||||
goto bad;
|
||||
|
||||
@@ -172,8 +173,9 @@ xchk_inode_flags2(
|
||||
{
|
||||
struct xfs_mount *mp = sc->mp;
|
||||
|
||||
/* Unknown di_flags2 could be from a future kernel */
|
||||
if (flags2 & ~XFS_DIFLAG2_ANY)
|
||||
goto bad;
|
||||
xchk_ino_set_warning(sc, ino);
|
||||
|
||||
/* reflink flag requires reflink feature */
|
||||
if ((flags2 & XFS_DIFLAG2_REFLINK) &&
|
||||
|
||||
Reference in New Issue
Block a user