]> git.ipfire.org Git - thirdparty/xfsprogs-dev.git/commitdiff
xfs_repair: remove unused fs_has_extflgbit_allowed
authorEric Sandeen <sandeen@redhat.com>
Tue, 3 Apr 2018 16:13:56 +0000 (11:13 -0500)
committerEric Sandeen <sandeen@sandeen.net>
Tue, 3 Apr 2018 16:13:56 +0000 (11:13 -0500)
fs_has_extflgbit_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 1fe0dbc990ee87547303b4b6ba061a1ad1c3fd99..930ed98b93918bec7f1d1e420cf05601a465aa9c 100644 (file)
@@ -47,10 +47,8 @@ update_sb_version(xfs_mount_t *mp)
         * have quotas.
         */
        if (fs_quotas)  {
-               if (!xfs_sb_version_hasquota(sb))  {
-                       ASSERT(fs_quotas_allowed);
+               if (!xfs_sb_version_hasquota(sb))
                        xfs_sb_version_addquota(sb);
-               }
 
                /*
                 * protect against stray bits in the quota flag field
@@ -204,33 +202,16 @@ _("WARNING: you have a V1 inode filesystem. It would be converted to a\n"
        }
 
        if (xfs_sb_version_hasquota(sb))  {
-               if (!fs_quotas_allowed)  {
-                       if (!no_modify)  {
-                               do_warn(
-_("WARNING:  you have disallowed quotas but this filesystem\n"
-  "\thas quotas.  The filesystem will be downgraded and\n"
-  "\tall quota information will be removed.\n"));
-                       } else  {
-                               do_warn(
-_("WARNING:  you have disallowed quotas but this filesystem\n"
-  "\thas quotas.  The filesystem would be downgraded and\n"
-  "\tall quota information would be removed.\n"));
-                       }
-               } else   {
-                       fs_quotas = 1;
+               fs_quotas = 1;
 
-                       if (sb->sb_uquotino != 0 &&
-                                       sb->sb_uquotino != NULLFSINO)
-                               have_uquotino = 1;
+               if (sb->sb_uquotino != 0 && sb->sb_uquotino != NULLFSINO)
+                       have_uquotino = 1;
 
-                       if (sb->sb_gquotino != 0 &&
-                                       sb->sb_gquotino != NULLFSINO)
-                               have_gquotino = 1;
+               if (sb->sb_gquotino != 0 && sb->sb_gquotino != NULLFSINO)
+                       have_gquotino = 1;
 
-                       if (sb->sb_pquotino != 0 &&
-                                       sb->sb_pquotino != NULLFSINO)
-                               have_pquotino = 1;
-               }
+               if (sb->sb_pquotino != 0 && sb->sb_pquotino != NULLFSINO)
+                       have_pquotino = 1;
        }
 
        if (xfs_sb_version_hasalign(sb))  {
index c4879762eb611dc082ab2732f9a61786736aaaa6..1ce51bd33c83662fedcf410f1f89978d4cd03c9c 100644 (file)
@@ -27,7 +27,6 @@
  * possible XFS filesystem features
  *
  * inode version 2 (32-bit link counts)                (6.2)
- * quotas                                      (6.2+)
  * aligned inodes                              (6.2+)
  *
  * bitmask fields happend after 6.2.
@@ -39,7 +38,6 @@
  * options
  */
 
-EXTERN int             fs_quotas_allowed;
 EXTERN int             fs_aligned_inodes_allowed;
 EXTERN int             fs_sb_feature_bits_allowed;
 EXTERN int             fs_has_extflgbit_allowed;
index 006f6cccb80042af88b566875871565e306058e2..20a587c506de09579716ce7c791b42caf1588d01 100644 (file)
@@ -207,7 +207,6 @@ process_args(int argc, char **argv)
        sb_inoalignmt = 0;
        sb_unit = 0;
        sb_width = 0;
-       fs_quotas_allowed = 1;
        fs_aligned_inodes_allowed = 1;
        fs_sb_feature_bits_allowed = 1;
        fs_has_extflgbit_allowed = 1;