summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/health.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2022-07-14 11:06:26 -0700
committerDarrick J. Wong <djwong@kernel.org>2022-10-14 14:16:45 -0700
commitb1b7c1cf25e2d59f0477b07c6b7f30630d3ea99b (patch)
tree102efc4467243b83e0da887f559dc983b551a56c /fs/xfs/scrub/health.c
parenta60dc9c84df8f7d3bcb25566568077ad3ac4e4b9 (diff)
xfs: remember sick inodes that get inactivated
If an unhealthy inode gets inactivated, remember this fact in the per-fs health summary. Signed-off-by: Darrick J. Wong <djwong@kernel.org>
Diffstat (limited to 'fs/xfs/scrub/health.c')
-rw-r--r--fs/xfs/scrub/health.c12
1 files changed, 11 insertions, 1 deletions
diff --git a/fs/xfs/scrub/health.c b/fs/xfs/scrub/health.c
index e5cc89d43808..962791c8fafb 100644
--- a/fs/xfs/scrub/health.c
+++ b/fs/xfs/scrub/health.c
@@ -155,7 +155,17 @@ xchk_update_health(
if (!sc->ip)
return;
if (bad) {
- xfs_inode_mark_sick(sc->ip, sc->sick_mask);
+ unsigned int mask = sc->sick_mask;
+
+ /*
+ * If we're coming in for repairs then we don't want
+ * sickness flags to propagate to the incore health
+ * status if the inode gets inactivated before we can
+ * fix it.
+ */
+ if (sc->sm->sm_flags & XFS_SCRUB_IFLAG_REPAIR)
+ mask |= XFS_SICK_INO_FORGET;
+ xfs_inode_mark_sick(sc->ip, mask);
xfs_inode_mark_checked(sc->ip, sc->sick_mask);
} else
xfs_inode_mark_healthy(sc->ip, sc->sick_mask);