From: Darrick J. Wong Date: Mon, 31 Jan 2022 22:46:04 +0000 (-0500) Subject: libxfs: clean up remaining LIBXFS_MOUNT flags X-Git-Tag: v5.15.0-rc0~6 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=e42c53f3d72da12da46bd3d264e14fb8b432f68d;p=thirdparty%2Fxfsprogs-dev.git 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 --- 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);