diff options
author | Darrick J. Wong <darrick.wong@oracle.com> | 2019-08-30 15:45:13 -0700 |
---|---|---|
committer | Darrick J. Wong <darrick.wong@oracle.com> | 2019-10-19 10:39:13 -0700 |
commit | 2e3773dc374b4a42ea990531ebeb6b39f5aa107c (patch) | |
tree | 8d7071e69dce4c3f56636b6113e2781b9c60a9e2 /fs/xfs/scrub/health.c | |
parent | 9cded0054140398824885283cb99ca35faa6bdd0 (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 4865b2180e22..3f93bb81f06f 100644 --- a/fs/xfs/scrub/health.c +++ b/fs/xfs/scrub/health.c @@ -145,9 +145,19 @@ xchk_update_health( case XHG_INO: if (!sc->ip) return; - if (bad) - xfs_inode_mark_sick(sc->ip, sc->sick_mask); - else + if (bad) { + 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); + } else xfs_inode_mark_healthy(sc->ip, sc->sick_mask); break; case XHG_FS: |