All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Darrick J. Wong" <djwong@kernel.org>
To: djwong@kernel.org
Cc: linux-xfs@vger.kernel.org
Subject: [PATCH 4/7] xfs: mark a data structure sick if there are cross-referencing errors
Date: Tue, 02 Mar 2021 14:28:59 -0800	[thread overview]
Message-ID: <161472413910.3421582.5713995044590901701.stgit@magnolia> (raw)
In-Reply-To: <161472411627.3421582.2040330025988154363.stgit@magnolia>

From: Darrick J. Wong <djwong@kernel.org>

If scrub observes cross-referencing errors while scanning a data
structure, mark the data structure sick.  There's /something/
inconsistent, even if we can't really tell what it is.

Fixes: 4860a05d2475 ("xfs: scrub/repair should update filesystem metadata health")
Signed-off-by: Darrick J. Wong <djwong@kernel.org>
---
 fs/xfs/scrub/health.c |    3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)


diff --git a/fs/xfs/scrub/health.c b/fs/xfs/scrub/health.c
index 83d27cdf579b..3de59b5c2ce6 100644
--- a/fs/xfs/scrub/health.c
+++ b/fs/xfs/scrub/health.c
@@ -133,7 +133,8 @@ xchk_update_health(
 	if (!sc->sick_mask)
 		return;
 
-	bad = (sc->sm->sm_flags & XFS_SCRUB_OFLAG_CORRUPT);
+	bad = (sc->sm->sm_flags & (XFS_SCRUB_OFLAG_CORRUPT |
+				   XFS_SCRUB_OFLAG_XCORRUPT));
 	switch (type_to_health_flag[sc->sm->sm_type].group) {
 	case XHG_AG:
 		pag = xfs_perag_get(sc->mp, sc->sm->sm_agno);


  parent reply	other threads:[~2021-03-03  3:19 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-03-02 22:28 [PATCHSET 0/7] xfs: small fixes and cleanups Darrick J. Wong
2021-03-02 22:28 ` [PATCH 1/7] xfs: fix uninitialized variables in xrep_calc_ag_resblks Darrick J. Wong
2021-03-05  8:23   ` Christoph Hellwig
2021-03-05 17:49     ` Darrick J. Wong
2021-03-06  7:15   ` Christoph Hellwig
2021-03-02 22:28 ` [PATCH 2/7] xfs: fix dquot scrub loop cancellation Darrick J. Wong
2021-03-05  8:24   ` Christoph Hellwig
2021-03-02 22:28 ` [PATCH 3/7] xfs: bail out of scrub immediately if scan incomplete Darrick J. Wong
2021-03-05  8:25   ` Christoph Hellwig
2021-03-02 22:28 ` Darrick J. Wong [this message]
2021-03-05  8:26   ` [PATCH 4/7] xfs: mark a data structure sick if there are cross-referencing errors Christoph Hellwig
2021-03-02 22:29 ` [PATCH 5/7] xfs: set the scrub AG number in xchk_ag_read_headers Darrick J. Wong
2021-03-05  8:27   ` Christoph Hellwig
2021-03-02 22:29 ` [PATCH 6/7] xfs: remove return value from xchk_ag_btcur_init Darrick J. Wong
2021-03-05  8:28   ` Christoph Hellwig
2021-03-02 22:29 ` [PATCH 7/7] xfs: validate ag btree levels using the precomputed values Darrick J. Wong
2021-03-05  8:29   ` Christoph Hellwig

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=161472413910.3421582.5713995044590901701.stgit@magnolia \
    --to=djwong@kernel.org \
    --cc=linux-xfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.