From 25b8487b49f50486c7b8e57677ce101fe6d6379d Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Wed, 24 Jul 2019 15:53:56 -0400 Subject: [PATCH] xfs: clear BAD_SUMMARY if unmounting an unhealthy filesystem Source kernel commit: 519841c207de9926418d2f39e162097088478781 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 Reviewed-by: Brian Foster Signed-off-by: Eric Sandeen --- libxfs/xfs_health.h | 2 ++ 1 file changed, 2 insertions(+) diff --git a/libxfs/xfs_health.h b/libxfs/xfs_health.h index 95053564a..0915d2097 100644 --- a/libxfs/xfs_health.h +++ b/libxfs/xfs_health.h @@ -118,6 +118,8 @@ void xfs_inode_mark_healthy(struct xfs_inode *ip, unsigned int mask); void xfs_inode_measure_sickness(struct xfs_inode *ip, unsigned int *sick, unsigned int *checked); +void xfs_health_unmount(struct xfs_mount *mp); + /* Now some helpers. */ static inline bool -- 2.47.2