From: Eric Sandeen Date: Tue, 3 Apr 2018 16:13:56 +0000 (-0500) Subject: xfs_repair: remove unused fs_sb_feature_bits_allowed X-Git-Tag: v4.16.0-rc1~22 X-Git-Url: http://git.ipfire.org/?a=commitdiff_plain;h=644589b162bfb7181708903288f7ee237da0adff;p=thirdparty%2Fxfsprogs-dev.git xfs_repair: remove unused fs_sb_feature_bits_allowed fs_sb_feature_bits_allowed is never set to anything but 1; remove it and all associated code. Signed-off-by: Eric Sandeen Reviewed-by: Darrick J. Wong Signed-off-by: Eric Sandeen --- diff --git a/repair/versions.c b/repair/versions.c index d2c58444d..34a309732 100644 --- a/repair/versions.c +++ b/repair/versions.c @@ -148,24 +148,8 @@ _("This filesystem contains features not understood by this program.\n")); return(1); } - if (XFS_SB_VERSION_NUM(sb) >= XFS_SB_VERSION_4) { - if (!fs_sb_feature_bits_allowed) { - if (!no_modify) { - do_warn( -_("WARNING: you have disallowed superblock-feature-bits-allowed\n" - "\tbut this superblock has feature bits. The superblock\n" - "\twill be downgraded. This may cause loss of filesystem meta-data\n")); - } else { - do_warn( -_("WARNING: you have disallowed superblock-feature-bits-allowed\n" - "\tbut this superblock has feature bits. The superblock\n" - "\twould be downgraded. This might cause loss of filesystem\n" - "\tmeta-data.\n")); - } - } else { - fs_sb_feature_bits = 1; - } - } + if (XFS_SB_VERSION_NUM(sb) >= XFS_SB_VERSION_4) + fs_sb_feature_bits = 1; /* Look for V5 feature flags we don't know about */ if (XFS_SB_VERSION_NUM(sb) >= XFS_SB_VERSION_5 && diff --git a/repair/versions.h b/repair/versions.h index a0688f815..94f577585 100644 --- a/repair/versions.h +++ b/repair/versions.h @@ -27,8 +27,6 @@ * possible XFS filesystem features * * inode version 2 (32-bit link counts) (6.2) - * - * bitmask fields happend after 6.2. */ /* @@ -37,7 +35,6 @@ * options */ -EXTERN int fs_sb_feature_bits_allowed; EXTERN int fs_has_extflgbit_allowed; EXTERN int fs_shared_allowed; diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c index 0b1920805..8b81ecc07 100644 --- a/repair/xfs_repair.c +++ b/repair/xfs_repair.c @@ -207,7 +207,6 @@ process_args(int argc, char **argv) sb_inoalignmt = 0; sb_unit = 0; sb_width = 0; - fs_sb_feature_bits_allowed = 1; fs_has_extflgbit_allowed = 1; pre_65_beta = 0; fs_shared_allowed = 1;