From 8188c9e6b3dc73c528ebaa6c65e7a96ccef807d1 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Wed, 13 Dec 2000 18:39:14 +0000 Subject: [PATCH] ChangeLog, pass1.c: 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 | 4 ++++ e2fsck/pass1.c | 15 ++++++++++----- 2 files changed, 14 insertions(+), 5 deletions(-) diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog index b6f73f4..e51a154 100644 --- a/e2fsck/ChangeLog +++ b/e2fsck/ChangeLog @@ -1,5 +1,9 @@ 2000-12-13 Theodore Ts'o + * 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 diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index e447044..7e9d9e0 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -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)) { -- 1.8.3.1