From e42c53f3d72da12da46bd3d264e14fb8b432f68d Mon Sep 17 00:00:00 2001 From: "Darrick J. Wong" Date: Mon, 31 Jan 2022 17:46:04 -0500 Subject: [PATCH] libxfs: clean up remaining LIBXFS_MOUNT flags Now that userspace libxfs also uses m_opstate to track operational state, the LIBXFS_MOUNT_* flags are only used for the flags argument passed to libxfs_mount(). Update the comment to reflect this, and clean up the flags and function declaration whiel we're at it. Signed-off-by: Darrick J. Wong Reviewed-by: Eric Sandeen Signed-off-by: Eric Sandeen --- include/xfs_mount.h | 6 ++++-- libxfs/init.c | 2 +- 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/include/xfs_mount.h b/include/xfs_mount.h index b02abc272..f3c03833b 100644 --- a/include/xfs_mount.h +++ b/include/xfs_mount.h @@ -249,8 +249,10 @@ static inline bool xfs_is_ ## name (struct xfs_mount *mp) \ __XFS_UNSUPP_OPSTATE(readonly) __XFS_UNSUPP_OPSTATE(shutdown) -#define LIBXFS_MOUNT_DEBUGGER 0x0001 -#define LIBXFS_MOUNT_WANT_CORRUPTED 0x0020 +/* don't fail on device size or AG count checks */ +#define LIBXFS_MOUNT_DEBUGGER (1U << 0) +/* report metadata corruption to stdout */ +#define LIBXFS_MOUNT_REPORT_CORRUPTION (1U << 1) #define LIBXFS_BHASHSIZE(sbp) (1<<10) diff --git a/libxfs/init.c b/libxfs/init.c index b58795023..5a3bf1697 100644 --- a/libxfs/init.c +++ b/libxfs/init.c @@ -727,7 +727,7 @@ libxfs_mount( mp->m_features = xfs_sb_version_to_features(sb); if (flags & LIBXFS_MOUNT_DEBUGGER) xfs_set_debugger(mp); - if (flags & LIBXFS_MOUNT_WANT_CORRUPTED) + if (flags & LIBXFS_MOUNT_REPORT_CORRUPTION) xfs_set_reporting_corruption(mp); libxfs_buftarg_init(mp, dev, logdev, rtdev); -- 2.47.2