Whamcloud - gitweb
ChangeLog, pass1.c:
authorTheodore Ts'o <tytso@mit.edu>
Wed, 13 Dec 2000 18:39:14 +0000 (18:39 +0000)
committerTheodore Ts'o <tytso@mit.edu>
Wed, 13 Dec 2000 18:39:14 +0000 (18:39 +0000)
  pass1.c (e2fsck_pass1): Offer to update the filesystem revision level
   if we need to set large files flag.  Patch from Andreas Dilger.

e2fsck/ChangeLog
e2fsck/pass1.c

index b6f73f4..e51a154 100644 (file)
@@ -1,5 +1,9 @@
 2000-12-13  Theodore Ts'o  <tytso@valinux.com>
 
+       * pass1.c (e2fsck_pass1): Offer to update the filesystem revision
+               level if we need to set large files flag.  Patch from
+               Andreas Dilger.
+
        * super.c (check_super_block): If we have any of the compatibility
                 flags set, we need to have a revision 1 filesystem.  Most
                 kernels will not check the flags on a rev 0 filesystem
index e447044..7e9d9e0 100644 (file)
@@ -606,14 +606,19 @@ endit:
        
        ext2fs_free_mem((void **) &block_buf);
 
-       if (ctx->large_files && 
-           !(sb->s_feature_ro_compat & 
-             EXT2_FEATURE_RO_COMPAT_LARGE_FILE)) {
-               if (fix_problem(ctx, PR_1_FEATURE_LARGE_FILES, &pctx)) {
-                       sb->s_feature_ro_compat |= 
+       if (ctx->large_files) {
+               if (!EXT2_HAS_RO_COMPAT_FEATURE(sb, 
+                       EXT2_FEATURE_RO_COMPAT_LARGE_FILE) &&
+                   fix_problem(ctx, PR_1_FEATURE_LARGE_FILES, &pctx)) {
+                       sb->s_feature_ro_compat |=
                                EXT2_FEATURE_RO_COMPAT_LARGE_FILE;
                        ext2fs_mark_super_dirty(fs);
                }
+               if (sb->s_rev_level == EXT2_GOOD_OLD_REV &&
+                   fix_problem(ctx, PR_1_FS_REV_LEVEL, &pctx)) {
+                       ext2fs_update_dynamic_rev(fs);
+                       ext2fs_mark_super_dirty(fs);
+               }
        } else if (!ctx->large_files &&
            (sb->s_feature_ro_compat &
              EXT2_FEATURE_RO_COMPAT_LARGE_FILE)) {