From: Niu Yawei Date: Fri, 9 Oct 2015 06:50:32 +0000 (-0400) Subject: LU-7267 e2fsck: remove duplicated ea value size check X-Git-Tag: v1.42.13.wc6~21 X-Git-Url: https://git.whamcloud.com/?a=commitdiff_plain;h=2e9a41e66aa91df3984d69159b264c6a5c413e84;p=tools%2Fe2fsprogs.git LU-7267 e2fsck: remove duplicated ea value size check Remove the duplicated ea value size check in check_ea_in_inode(). Add a regression test by modifying the test in f_valid_ea_in_inode: - Enable EA_INODE feature to the image; - Add a new file which has large xattr, so that this file has both extra space in inode and external inode for large ea. Signed-off-by: Niu Yawei Change-Id: I1c1a4c444ee61d8d7e26ea878bcef56471aa9c42 Reviewed-on: http://review.whamcloud.com/16779 Tested-by: Jenkins Reviewed-by: Andreas Dilger Tested-by: Andreas Dilger --- diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c index 9584a0c..ffdfc41 100644 --- a/e2fsck/pass1.c +++ b/e2fsck/pass1.c @@ -446,13 +446,6 @@ static void check_ea_in_inode(e2fsck_t ctx, struct problem_context *pctx) /* attribute len eats this space */ remain -= EXT2_EXT_ATTR_SIZE(entry->e_name_len); - /* check value size */ - if (entry->e_value_size > remain) { - pctx->num = entry->e_value_size; - problem = PR_1_ATTR_VALUE_SIZE; - goto fix; - } - if (entry->e_value_inum == 0) { /* check value size */ if (entry->e_value_size > remain) { diff --git a/tests/f_valid_ea_in_inode/expect.1 b/tests/f_valid_ea_in_inode/expect.1 index a4d6dd2..747e680 100644 --- a/tests/f_valid_ea_in_inode/expect.1 +++ b/tests/f_valid_ea_in_inode/expect.1 @@ -3,5 +3,5 @@ Pass 2: Checking directory structure Pass 3: Checking directory connectivity Pass 4: Checking reference counts Pass 5: Checking group summary information -test_filesys: 22/2048 files (0.0% non-contiguous), 2072/8192 blocks +test_filesys: 24/2048 files (0.0% non-contiguous), 2078/8192 blocks Exit status is 0 diff --git a/tests/f_valid_ea_in_inode/image.gz b/tests/f_valid_ea_in_inode/image.gz index e40f783..9f91f61 100644 Binary files a/tests/f_valid_ea_in_inode/image.gz and b/tests/f_valid_ea_in_inode/image.gz differ