xfs: clear BAD_SUMMARY if unmounting an unhealthy filesystem
authorDarrick J. Wong <darrick.wong@oracle.com>
Fri, 12 Apr 2019 14:41:16 +0000 (07:41 -0700)
committerDarrick J. Wong <darrick.wong@oracle.com>
Mon, 15 Apr 2019 01:15:57 +0000 (18:15 -0700)
commit519841c207de9926418d2f39e162097088478781
treef26f894e44f7d012ee7b981940b64454e1c7492a
parent39353ff6e96fb623230341ca89b0f4ef3a04998f
xfs: clear BAD_SUMMARY if unmounting an unhealthy filesystem

If we know the filesystem metadata isn't healthy during unmount, we want
to encourage the administrator to run xfs_repair right away.  We can't
do this if BAD_SUMMARY will cause an unclean log unmount to force
summary recalculation, so turn it off if the fs is bad.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Reviewed-by: Brian Foster <bfoster@redhat.com>
fs/xfs/libxfs/xfs_health.h
fs/xfs/xfs_health.c
fs/xfs/xfs_mount.c
fs/xfs/xfs_trace.h