]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: remove unused fs_attributes_allowed
authorEric Sandeen <sandeen@redhat.com>
Tue, 3 Apr 2018 16:13:49 +0000 (11:13 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 3 Apr 2018 16:13:49 +0000 (11:13 -0500)
fs_attributes_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>
repair/versions.c
repair/versions.h
repair/xfs_repair.c

index 978f48b84f22670f280ac7b2b256054e72f21b5b..cbf660d2e74352b68e9a7997ae6f418b109d4a7c 100644 (file)
@@ -31,10 +31,8 @@ update_sb_version(xfs_mount_t *mp)
 
        sb = &mp->m_sb;
 
-       if (fs_attributes && !xfs_sb_version_hasattr(sb))  {
-               ASSERT(fs_attributes_allowed);
+       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);
@@ -187,23 +185,8 @@ _("Superblock has unknown compat/rocompat/incompat features (0x%x/0x%x/0x%x).\n"
                return 1;
        }
 
-       if (xfs_sb_version_hasattr(sb))  {
-               if (!fs_attributes_allowed)  {
-                       if (!no_modify)  {
-                               do_warn(
-_("WARNING:  you have disallowed attributes but this filesystem\n"
-  "\thas attributes.  The filesystem will be downgraded and\n"
-  "\tall attributes will be removed.\n"));
-                       } else  {
-                               do_warn(
-_("WARNING:  you have disallowed attributes but this filesystem\n"
-  "\thas attributes.  The filesystem would be downgraded and\n"
-  "\tall attributes would be removed.\n"));
-                       }
-               } else   {
-                       fs_attributes = 1;
-               }
-       }
+       if (xfs_sb_version_hasattr(sb))
+               fs_attributes = 1;
 
        if (xfs_sb_version_hasattr2(sb))  {
                if (!fs_attributes2_allowed)  {
index 36a5262298093c854cd88ad0eeb39b92014bf10d..354a797099c79467f8e21d89ca702f955b2874ff 100644 (file)
@@ -26,7 +26,6 @@
 /*
  * possible XFS filesystem features
  *
- * attributes                                  (6.2)
  * inode version 2 (32-bit link counts)                (6.2)
  * quotas                                      (6.2+)
  * aligned inodes                              (6.2+)
@@ -40,7 +39,6 @@
  * options
  */
 
-EXTERN int             fs_attributes_allowed;
 EXTERN int             fs_attributes2_allowed;
 EXTERN int             fs_quotas_allowed;
 EXTERN int             fs_aligned_inodes_allowed;
index 6bb8ea26fc2f9c63097b8722d59f68ad8510fd61..137a39c4bed35b2c1f315b9ce2c991fc163cd372 100644 (file)
@@ -207,7 +207,6 @@ process_args(int argc, char **argv)
        sb_inoalignmt = 0;
        sb_unit = 0;
        sb_width = 0;
-       fs_attributes_allowed = 1;
        fs_attributes2_allowed = 1;
        fs_quotas_allowed = 1;
        fs_aligned_inodes_allowed = 1;