diff options
author | Darrick J. Wong <djwong@kernel.org> | 2022-07-14 11:06:26 -0700 |
---|---|---|
committer | Darrick J. Wong <djwong@kernel.org> | 2022-11-09 19:07:33 -0800 |
commit | f18d2034841934b5cdc65a4386b6705d0e6f5e90 (patch) | |
tree | 72ff7b2a3d5a6c83e9f9cf2cbf6de141856f73aa /fs/xfs/scrub | |
parent | 0b0ad0c861f4995373e3fb0f870205e4939517a6 (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')
-rw-r--r-- | fs/xfs/scrub/health.c | 12 |
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); |