linux-xfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] xfs: don't treat unknown di_flags[2] as corruption in scrub
@ 2018-09-18  2:41 Eric Sandeen
  2018-09-18  3:18 ` Darrick J. Wong
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Eric Sandeen @ 2018-09-18  2:41 UTC (permalink / raw)
  To: linux-xfs

xchk_inode_flags[2]() currently treats any di_flags[2] 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_flags[2].)

Call xchk_ino_set_warning instead, because this may or may not actually
indicate a problem.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
---

diff --git a/fs/xfs/scrub/inode.c b/fs/xfs/scrub/inode.c
index 5b3b177..e53ed83 100644
--- a/fs/xfs/scrub/inode.c
+++ b/fs/xfs/scrub/inode.c
@@ -126,8 +126,9 @@
 {
 	struct xfs_mount	*mp = sc->mp;
 
+	/* Unknown di_flags could simply be from newer kernel */
 	if (flags & ~XFS_DIFLAG_ANY)
-		goto bad;
+		xchk_ino_set_warning(sc, ino);
 
 	/* rt flags require rt device */
 	if ((flags & (XFS_DIFLAG_REALTIME | XFS_DIFLAG_RTINHERIT)) &&
@@ -172,8 +173,9 @@
 {
 	struct xfs_mount	*mp = sc->mp;
 
+	/* Unknown di_flags2 could simply be from newer kernel */
 	if (flags2 & ~XFS_DIFLAG2_ANY)
-		goto bad;
+		xchk_ino_set_warning(sc, ino);
 
 	/* reflink flag requires reflink feature */
 	if ((flags2 & XFS_DIFLAG2_REFLINK) &&

^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-09-18 19:48 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-09-18  2:41 [PATCH] xfs: don't treat unknown di_flags[2] as corruption in scrub Eric Sandeen
2018-09-18  3:18 ` Darrick J. Wong
2018-09-18  5:20 ` Dave Chinner
2018-09-18 12:11   ` Eric Sandeen
2018-09-18 12:18     ` Dave Chinner
2018-09-18 13:50 ` [PATCH V2] xfs: don't treat unknown di_flags2 " Eric Sandeen
2018-09-18 14:15   ` Darrick J. Wong

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).