From b70506bffba208daa2dc176be9370bc198ecd221 Mon Sep 17 00:00:00 2001 From: Theodore Ts'o Date: Fri, 24 Sep 2010 22:57:06 -0400 Subject: 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" --- e2fsck/pass1.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'e2fsck') diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 93763cd8..67dd986f 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; -- cgit v1.2.3