@@ -447,6 +447,11 @@ static struct e2fsck_problem problem_table[] = {
N_("@S MMP block checksum does not match MMP block. "),
PROMPT_FIX, PR_PREEN_OK | PR_NO_OK},
+ /* 64bit is set but extents is unset. */
+ { PR_0_64BIT_WITHOUT_EXTENTS,
+ N_("@S 64bit filesystems needs extents to access the whole disk. "),
+ PROMPT_FIX, PR_PREEN_OK | PR_NO_OK},
+
/* Pass 1 errors */
/* Pass 1: Checking inodes, blocks, and sizes */
@@ -258,6 +258,8 @@ struct problem_context {
/* Superblock has invalid MMP checksum. */
#define PR_0_MMP_CSUM_INVALID 0x000047
+/* 64bit is set but extents are not set. */
+#define PR_0_64BIT_WITHOUT_EXTENTS 0x000048
/*
* Pass 1 errors
@@ -595,6 +595,17 @@ void check_super_block(e2fsck_t ctx)
ext2fs_group_desc_csum_set(fs, i);
}
+ /* Is 64bit set and extents unset? */
+ if (EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+ EXT4_FEATURE_INCOMPAT_64BIT) &&
+ !EXT2_HAS_INCOMPAT_FEATURE(fs->super,
+ EXT3_FEATURE_INCOMPAT_EXTENTS) &&
+ fix_problem(ctx, PR_0_64BIT_WITHOUT_EXTENTS, &pctx)) {
+ fs->super->s_feature_incompat |=
+ EXT3_FEATURE_INCOMPAT_EXTENTS;
+ ext2fs_mark_super_dirty(fs);
+ }
+
/*
* Verify the group descriptors....
*/
Since it's impossible to address all blocks of a 64bit filesystem without extents, have e2fsck turn on the feature if it finds (64bit && !extents). Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com> --- e2fsck/problem.c | 5 +++++ e2fsck/problem.h | 2 ++ e2fsck/super.c | 11 +++++++++++ 3 files changed, 18 insertions(+) -- To unsubscribe from this list: send the line "unsubscribe linux-ext4" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html