[<prev] [next>] [day] [month] [year] [list]
Message-Id: <20100514214200.8B9DB1BC317@ruihe.smo.corp.google.com>
Date: Fri, 14 May 2010 14:42:00 -0700 (PDT)
From: jiayingz@...gle.com (Jiaying Zhang)
To: curtw@...gle.com, fmayhar@...gle.com, mrubin@...gle.com,
tytso@....edu
Cc: linux-ext4@...r.kernel.org
Subject: [PATCH] fix the extent validity checking in e2fsck
This patch changes e2fsck to use the same checking on the validity of an extent
as the kernel ext4 is using.
Signed-off-by: Jiaying Zhang <jiayingz@...gle.com>
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index 3c6f91c..c5dc01a 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -1690,8 +1690,8 @@ static void scan_extent_node(e2fsck_t ctx, struct problem_context *pctx,
is_dir = LINUX_S_ISDIR(pctx->inode->i_mode);
problem = 0;
- if (extent.e_pblk < ctx->fs->super->s_first_data_block ||
- extent.e_pblk >= ext2fs_blocks_count(ctx->fs->super))
+ if (extent.e_pblk <= ctx->fs->super->s_first_data_block ||
+ extent.e_pblk > ext2fs_blocks_count(ctx->fs->super))
problem = PR_1_EXTENT_BAD_START_BLK;
else if (extent.e_lblk < start_block)
problem = PR_1_OUT_OF_ORDER_EXTENTS;
--
To unsubscribe from this list: send the line "unsubscribe linux-ext4" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Powered by blists - more mailing lists