summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/health.c
diff options
context:
space:
mode:
authorDarrick J. Wong <djwong@kernel.org>2021-01-05 17:43:51 -0800
committerDarrick J. Wong <djwong@kernel.org>2021-03-25 17:08:24 -0700
commit908267af2127feadc4520c567aca270a399a01d4 (patch)
tree26bfb73931ea2c02cf3b77d432a08f9a7591fb54 /fs/xfs/scrub/health.c
parent85f942d75ba203edd1ac8593a171bc1dbcabe66d (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 1b734938e76b..837011236d73 100644
--- a/fs/xfs/scrub/health.c
+++ b/fs/xfs/scrub/health.c
@@ -150,7 +150,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);