mirror of https://github.com/vitalif/e2fsprogs
e2fsck: On a 32-bit filesystem, make sure i_file_acl_high is zero
Signed-off-by: "Theodore Ts'o" <tytso@mit.edu>bitmap-optimize
parent
e60c25b03f
commit
911ec62615
|
@ -935,6 +935,10 @@ void e2fsck_pass1(e2fsck_t ctx)
|
|||
if (inode->i_faddr || frag || fsize ||
|
||||
(LINUX_S_ISDIR(inode->i_mode) && inode->i_dir_acl))
|
||||
mark_inode_bad(ctx, ino);
|
||||
if (!(fs->super->s_feature_incompat &
|
||||
EXT4_FEATURE_INCOMPAT_64BIT) &&
|
||||
inode->osd2.linux2.l_i_file_acl_high != 0)
|
||||
mark_inode_bad(ctx, ino);
|
||||
if ((fs->super->s_creator_os == EXT2_OS_LINUX) &&
|
||||
!(fs->super->s_feature_ro_compat &
|
||||
EXT4_FEATURE_RO_COMPAT_HUGE_FILE) &&
|
||||
|
|
|
@ -1353,6 +1353,17 @@ extern int e2fsck_process_bad_inode(e2fsck_t ctx, ext2_ino_t dir,
|
|||
}
|
||||
}
|
||||
|
||||
if (!(fs->super->s_feature_incompat &
|
||||
EXT4_FEATURE_INCOMPAT_64BIT) &&
|
||||
inode.osd2.linux2.l_i_file_acl_high != 0) {
|
||||
pctx.num = inode.osd2.linux2.l_i_file_acl_high;
|
||||
if (fix_problem(ctx, PR_2_I_FILE_ACL_HI_ZERO, &pctx)) {
|
||||
inode.osd2.linux2.l_i_file_acl_high = 0;
|
||||
inode_modified++;
|
||||
} else
|
||||
not_fixed++;
|
||||
}
|
||||
|
||||
if (inode.i_file_acl &&
|
||||
((inode.i_file_acl < fs->super->s_first_data_block) ||
|
||||
(inode.i_file_acl >= fs->super->s_blocks_count))) {
|
||||
|
|
|
@ -1286,6 +1286,11 @@ static struct e2fsck_problem problem_table[] = {
|
|||
N_("@E references @i %Di found in @g %g's unused inodes area.\n"),
|
||||
PROMPT_FIX, PR_PREEN_OK },
|
||||
|
||||
/* i_blocks_hi should be zero */
|
||||
{ PR_2_I_FILE_ACL_HI_ZERO,
|
||||
N_("i_file_acl_hi @F %N, @s zero.\n"),
|
||||
PROMPT_CLEAR, 0 },
|
||||
|
||||
/* Pass 3 errors */
|
||||
|
||||
/* Pass 3: Checking directory connectivity */
|
||||
|
|
|
@ -768,6 +768,9 @@ struct problem_context {
|
|||
/* Inode found in group unused inodes area */
|
||||
#define PR_2_INOREF_IN_UNUSED 0x020047
|
||||
|
||||
/* i_file_acl_hi should be zero */
|
||||
#define PR_2_I_FILE_ACL_HI_ZERO 0x020048
|
||||
|
||||
/*
|
||||
* Pass 3 errors
|
||||
*/
|
||||
|
|
|
@ -0,0 +1,12 @@
|
|||
Pass 1: Checking inodes, blocks, and sizes
|
||||
Pass 2: Checking directory structure
|
||||
i_file_acl_hi for inode 12 (/motd) is 2, should be zero.
|
||||
Clear? yes
|
||||
|
||||
Pass 3: Checking directory connectivity
|
||||
Pass 4: Checking reference counts
|
||||
Pass 5: Checking group summary information
|
||||
|
||||
test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
|
||||
test_filesys: 12/16 files (0.0% non-contiguous), 22/100 blocks
|
||||
Exit status is 1
|
|
@ -0,0 +1,7 @@
|
|||
Pass 1: Checking inodes, blocks, and sizes
|
||||
Pass 2: Checking directory structure
|
||||
Pass 3: Checking directory connectivity
|
||||
Pass 4: Checking reference counts
|
||||
Pass 5: Checking group summary information
|
||||
test_filesys: 12/16 files (0.0% non-contiguous), 22/100 blocks
|
||||
Exit status is 0
|
Binary file not shown.
|
@ -0,0 +1 @@
|
|||
i_file_acl_high should be zero
|
Loading…
Reference in New Issue