summaryrefslogtreecommitdiff
path: root/fs/xfs/scrub/health.c
diff options
context:
space:
mode:
Diffstat (limited to 'fs/xfs/scrub/health.c')
-rw-r--r--fs/xfs/scrub/health.c16
1 files changed, 13 insertions, 3 deletions
diff --git a/fs/xfs/scrub/health.c b/fs/xfs/scrub/health.c
index bc0715eea123..0f047ee987be 100644
--- a/fs/xfs/scrub/health.c
+++ b/fs/xfs/scrub/health.c
@@ -152,9 +152,19 @@ xchk_update_health(
case XHG_INO:
if (!sc->ip)
return;
- if (bad)
- xfs_inode_mark_sick(sc->ip, sc->sick_mask_update);
- else
+ if (bad) {
+ unsigned int mask = sc->sick_mask_update;
+
+ /*
+ * 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);
+ } else
xfs_inode_mark_healthy(sc->ip, sc->sick_mask_update);
break;
case XHG_FS: