]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
libxfs: replace xfs_sb_version checks with feature flag checks
authorDarrick J. Wong <djwong@kernel.org>
Mon, 31 Jan 2022 22:27:44 +0000 (17:27 -0500)
committerEric Sandeen <sandeen@redhat.com>
Mon, 31 Jan 2022 22:27:44 +0000 (17:27 -0500)
Convert the xfs_sb_version_hasfoo() to checks against mp->m_features.

Signed-off-by: Darrick J. Wong <djwong@kernel.org>
[sandeen: drop one hunk that wasn't really a conversion]
Reviewed-by: Eric Sandeen <sandeen@redhat.com>
Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
libxfs/init.c

index 875c847edf48a5ba9c44486683303e0ce9d27f32..6b44a276f84cba7a9828e30d60330229400b4c5b 100644 (file)
@@ -435,14 +435,14 @@ rtmount_init(
        if (mp->m_sb.sb_rblocks == 0)
                return 0;
 
-       if (xfs_sb_version_hasreflink(&mp->m_sb)) {
+       if (xfs_has_reflink(mp)) {
                fprintf(stderr,
        _("%s: Reflink not compatible with realtime device. Please try a newer xfsprogs.\n"),
                                progname);
                return -1;
        }
 
-       if (xfs_sb_version_hasrmapbt(&mp->m_sb)) {
+       if (xfs_has_rmapbt(mp)) {
                fprintf(stderr,
        _("%s: Reverse mapping btree not compatible with realtime device. Please try a newer xfsprogs.\n"),
                                progname);