From: Darrick J. Wong Date: Wed, 24 Jul 2019 19:53:56 +0000 (-0400) Subject: xfs: clear BAD_SUMMARY if unmounting an unhealthy filesystem X-Git-Tag: v5.2.0-rc0~13 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=25b8487b49f50486c7b8e57677ce101fe6d6379d;p=thirdparty%2Fxfsprogs-dev.git 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 --- 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