aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorEric Sandeen <sandeen@redhat.com>2018-04-03 11:13:56 -0500
committerEric Sandeen <sandeen@sandeen.net>2018-04-03 11:13:56 -0500
commit232470f233c24676414a1d3ad433d0429f7f3241 (patch)
treecd163adf765dbc7c3f471acef19f69ce88c54007
parent497d0706d222700b3005ca0d4bd067293829b36d (diff)
downloadxfsprogs-dev-232470f233c24676414a1d3ad433d0429f7f3241.tar.gz
xfs_repair: remove unused fs_attributes2_allowed
fs_attributes2_allowed is never set to anything but 1; remove it and all associated code. Signed-off-by: Eric Sandeen <sandeen@redhat.com> Reviewed-by: Darrick J. Wong <darrick.wong@oracle.com> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
-rw-r--r--repair/versions.c23
-rw-r--r--repair/versions.h1
-rw-r--r--repair/xfs_repair.c1
3 files changed, 3 insertions, 22 deletions
diff --git a/repair/versions.c b/repair/versions.c
index cbf660d2e7..1fe0dbc990 100644
--- a/repair/versions.c
+++ b/repair/versions.c
@@ -34,10 +34,8 @@ update_sb_version(xfs_mount_t *mp)
if (fs_attributes && !xfs_sb_version_hasattr(sb))
xfs_sb_version_addattr(sb);
- if (fs_attributes2 && !xfs_sb_version_hasattr2(sb)) {
- ASSERT(fs_attributes2_allowed);
+ if (fs_attributes2 && !xfs_sb_version_hasattr2(sb))
xfs_sb_version_addattr2(sb);
- }
/* V2 inode conversion is now always going to happen */
if (!(sb->sb_versionnum & XFS_SB_VERSION_NLINKBIT))
@@ -188,23 +186,8 @@ _("Superblock has unknown compat/rocompat/incompat features (0x%x/0x%x/0x%x).\n"
if (xfs_sb_version_hasattr(sb))
fs_attributes = 1;
- if (xfs_sb_version_hasattr2(sb)) {
- if (!fs_attributes2_allowed) {
- if (!no_modify) {
- do_warn(
-_("WARNING: you have disallowed attr2 attributes but this filesystem\n"
- "\thas attributes. The filesystem will be downgraded and\n"
- "\tall attr2 attributes will be removed.\n"));
- } else {
- do_warn(
-_("WARNING: you have disallowed attr2 attributes but this filesystem\n"
- "\thas attributes. The filesystem would be downgraded and\n"
- "\tall attr2 attributes would be removed.\n"));
- }
- } else {
- fs_attributes2 = 1;
- }
- }
+ if (xfs_sb_version_hasattr2(sb))
+ fs_attributes2 = 1;
if (!(sb->sb_versionnum & XFS_SB_VERSION_NLINKBIT)) {
if (!no_modify) {
diff --git a/repair/versions.h b/repair/versions.h
index 354a797099..c4879762eb 100644
--- a/repair/versions.h
+++ b/repair/versions.h
@@ -39,7 +39,6 @@
* options
*/
-EXTERN int fs_attributes2_allowed;
EXTERN int fs_quotas_allowed;
EXTERN int fs_aligned_inodes_allowed;
EXTERN int fs_sb_feature_bits_allowed;
diff --git a/repair/xfs_repair.c b/repair/xfs_repair.c
index 137a39c4be..006f6cccb8 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_attributes2_allowed = 1;
fs_quotas_allowed = 1;
fs_aligned_inodes_allowed = 1;
fs_sb_feature_bits_allowed = 1;