mirror of https://github.com/vitalif/e2fsprogs
e2fsck: enable extents on all 64bit filesystems
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> Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>debian-1.42.9
parent
d11f92af35
commit
27b2297d57
|
@ -433,6 +433,11 @@ static struct e2fsck_problem problem_table[] = {
|
|||
N_("ext2fs_check_desc: %m\n"),
|
||||
PROMPT_NONE, 0 },
|
||||
|
||||
/* 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 */
|
||||
|
|
|
@ -249,6 +249,9 @@ struct problem_context {
|
|||
/* Checking group descriptor failed */
|
||||
#define PR_0_CHECK_DESC_FAILED 0x000045
|
||||
|
||||
/* 64bit is set but extents are not set. */
|
||||
#define PR_0_64BIT_WITHOUT_EXTENTS 0x000048
|
||||
|
||||
/*
|
||||
* Pass 1 errors
|
||||
*/
|
||||
|
|
|
@ -582,6 +582,17 @@ void check_super_block(e2fsck_t ctx)
|
|||
}
|
||||
}
|
||||
|
||||
/* 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....
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue