From: Darrick J. Wong Date: Wed, 24 Jul 2019 19:53:56 +0000 (-0400) Subject: xfs: replace the BAD_SUMMARY mount flag with the equivalent health code X-Git-Tag: v5.2.0-rc0~14 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=7b55f0f2e5f97697f1253f53e21f770f7a4796fc;p=thirdparty%2Fxfsprogs-dev.git xfs: replace the BAD_SUMMARY mount flag with the equivalent health code Source kernel commit: 39353ff6e96fb623230341ca89b0f4ef3a04998f Replace the BAD_SUMMARY mount flag with calls to the equivalent health tracking code. Signed-off-by: Darrick J. Wong Reviewed-by: Brian Foster Signed-off-by: Eric Sandeen --- diff --git a/libxfs/xfs_sb.c b/libxfs/xfs_sb.c index f1e2ba574..b2c1421be 100644 --- a/libxfs/xfs_sb.c +++ b/libxfs/xfs_sb.c @@ -27,6 +27,7 @@ #include "xfs_refcount_btree.h" #include "xfs_da_format.h" #include "xfs_da_btree.h" +#include "xfs_health.h" /* * Physical superblock buffer manipulations. Shared with libxfs in userspace. @@ -882,7 +883,7 @@ xfs_initialize_perag_data( /* * If the new summary counts are obviously incorrect, fail the * mount operation because that implies the AGFs are also corrupt. - * Clear BAD_SUMMARY so that we don't unmount with a dirty log, which + * Clear FS_COUNTERS so that we don't unmount with a dirty log, which * will prevent xfs_repair from fixing anything. */ if (fdblocks > sbp->sb_dblocks || ifree > ialloc) { @@ -900,7 +901,7 @@ xfs_initialize_perag_data( xfs_reinit_percpu_counters(mp); out: - mp->m_flags &= ~XFS_MOUNT_BAD_SUMMARY; + xfs_fs_mark_healthy(mp, XFS_SICK_FS_COUNTERS); return error; }