diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-03-20 17:06:04 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-04-15 17:02:47 -0700 |
commit | bc649784ea986bfc6515e6cd62afcb8378fa6324 (patch) | |
tree | 6ada4e45e79e233c31aa4d48240f22c0f29afcfb /fs/xfs/scrub/health.c | |
parent | 050128cb2e4505c12f8333c5a0d3338b49dd77a1 (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 <darrick.wong@oracle.com>
Diffstat (limited to 'fs/xfs/scrub/health.c')
-rw-r--r-- | fs/xfs/scrub/health.c | 16 |
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: |