From: Theodore Ts'o Date: Sat, 25 Sep 2010 02:57:06 +0000 (-0400) Subject: e2fsck: Set i_blocks_hi when correcting the i_blocks field in pass #1 X-Git-Tag: v1.42-WIP-0702~84 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=b70506bffba208daa2dc176be9370bc198ecd221;p=thirdparty%2Fe2fsprogs.git e2fsck: Set i_blocks_hi when correcting the i_blocks field in pass #1 For file systems with 64-bit block numbers, we need to make sure we correct the i_blocks_hi field as well as the i_blocks field when setting it to the correct value. Thanks to Justin Maggard for pointing this out. Signed-off-by: "Theodore Ts'o" --- diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 93763cd8a..67dd986fa 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -2036,7 +2036,7 @@ static void check_blocks(e2fsck_t ctx, struct problem_context *pctx, pctx->num = pb.num_blocks; if (fix_problem(ctx, PR_1_BAD_I_BLOCKS, pctx)) { inode->i_blocks = pb.num_blocks; - inode->osd2.linux2.l_i_blocks_hi = 0; + inode->osd2.linux2.l_i_blocks_hi = pb.num_blocks >> 32; dirty_inode++; } pctx->num = 0;