Whamcloud - gitweb
LU-7267 e2fsck: remove duplicated ea value size check
authorNiu Yawei <yawei.niu@intel.com>
Fri, 9 Oct 2015 06:50:32 +0000 (02:50 -0400)
committerAndreas Dilger <andreas.dilger@intel.com>
Tue, 10 May 2016 05:12:34 +0000 (23:12 -0600)
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 <yawei.niu@intel.com>
Change-Id: I1c1a4c444ee61d8d7e26ea878bcef56471aa9c42
Reviewed-on: http://review.whamcloud.com/16779
Tested-by: Jenkins
Reviewed-by: Andreas Dilger <andreas.dilger@intel.com>
Tested-by: Andreas Dilger <andreas.dilger@intel.com>
e2fsck/pass1.c
tests/f_valid_ea_in_inode/expect.1
tests/f_valid_ea_in_inode/image.gz

index 9584a0c..ffdfc41 100644 (file)
@@ -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) {
index a4d6dd2..747e680 100644 (file)
@@ -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
index e40f783..9f91f61 100644 (file)
Binary files a/tests/f_valid_ea_in_inode/image.gz and b/tests/f_valid_ea_in_inode/image.gz differ