From: Eric Sandeen Date: Tue, 9 Oct 2018 16:49:42 +0000 (-0500) Subject: xfs: don't treat unknown di_flags2 as corruption in scrub X-Git-Tag: v4.19.0-rc1~59 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=f69ea1f4fe4f28ff6a24f6fb2d2c2c4c6db0e6ad;p=thirdparty%2Fxfsprogs-dev.git xfs: don't treat unknown di_flags2 as corruption in scrub Source kernel commit: f369a13cead821e679c7415dc66a17ec48cc26bf 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 Reviewed-by: Darrick J. Wong Signed-off-by: Dave Chinner Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_format.h b/libxfs/xfs_format.h index be3a3bf92..da87afa7e 100644 --- a/libxfs/xfs_format.h +++ b/libxfs/xfs_format.h @@ -1016,6 +1016,8 @@ static inline void xfs_dinode_put_rdev(struct xfs_dinode *dip, xfs_dev_t rdev) #define XFS_DIFLAG_EXTSZINHERIT_BIT 12 /* inherit inode extent size */ #define XFS_DIFLAG_NODEFRAG_BIT 13 /* do not reorganize/defragment */ #define XFS_DIFLAG_FILESTREAM_BIT 14 /* use filestream allocator */ +/* Do not use bit 15, di_flags is legacy and unchanging now */ + #define XFS_DIFLAG_REALTIME (1 << XFS_DIFLAG_REALTIME_BIT) #define XFS_DIFLAG_PREALLOC (1 << XFS_DIFLAG_PREALLOC_BIT) #define XFS_DIFLAG_NEWRTBM (1 << XFS_DIFLAG_NEWRTBM_BIT)