Whamcloud - gitweb
e2fsck: actually fix inline_data flags problems when user says to do so
authorDarrick J. Wong <darrick.wong@oracle.com>
Sun, 29 Mar 2015 04:04:46 +0000 (00:04 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Sun, 29 Mar 2015 04:04:46 +0000 (00:04 -0400)
fix_problem() returning 1 means to fix the fs error, so do that.

Signed-off-by: Darrick J. Wong <darrick.wong@oracle.com>
Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass1.c
tests/f_bad_disconnected_inode/expect.1

index f3c134e..791817b 100644 (file)
@@ -1196,12 +1196,12 @@ void e2fsck_pass1(e2fsck_t ctx)
 
                        pctx.errcode = ext2fs_inline_data_size(fs, ino, &size);
                        if (!pctx.errcode && size &&
-                           !fix_problem(ctx, PR_1_INLINE_DATA_FEATURE, &pctx)) {
+                           fix_problem(ctx, PR_1_INLINE_DATA_FEATURE, &pctx)) {
                                sb->s_feature_incompat |=
                                        EXT4_FEATURE_INCOMPAT_INLINE_DATA;
                                ext2fs_mark_super_dirty(fs);
                                inlinedata_fs = 1;
-                       } else if (!fix_problem(ctx, PR_1_INLINE_DATA_SET, &pctx)) {
+                       } else if (fix_problem(ctx, PR_1_INLINE_DATA_SET, &pctx)) {
                                e2fsck_clear_inode(ctx, ino, inode, 0, "pass1");
                                /* skip FINISH_INODE_LOOP */
                                continue;
index 9f9b447..c5ea7bf 100644 (file)
@@ -8,15 +8,9 @@ Clear? yes
 Inode 15 has INLINE_DATA_FL flag on filesystem without inline data support.
 Clear? yes
 
-Inode 15 has EXTENTS_FL flag set on filesystem without extents support.
-Clear? yes
-
 Inode 16 has INLINE_DATA_FL flag on filesystem without inline data support.
 Clear? yes
 
-Inode 16 has EXTENTS_FL flag set on filesystem without extents support.
-Clear? yes
-
 Pass 2: Checking directory structure
 Pass 3: Checking directory connectivity
 /lost+found not found.  Create? yes
@@ -30,12 +24,6 @@ Clear? yes
 Inode 13 (...) has invalid mode (0117003).
 Clear? yes
 
-i_file_acl for inode 14 (...) is 2892851642, should be zero.
-Clear? yes
-
-Inode 14 (...) has invalid mode (0154247).
-Clear? yes
-
 Pass 5: Checking group summary information
 Block bitmap differences:  -(9--19)
 Fix? yes
@@ -46,15 +34,9 @@ Fix? yes
 Free blocks count wrong (79, counted=91).
 Fix? yes
 
-Free inodes count wrong for group #0 (6, counted=5).
-Fix? yes
-
 Directories count wrong for group #0 (3, counted=2).
 Fix? yes
 
-Free inodes count wrong (6, counted=5).
-Fix? yes
-
 
 test_filesys: ***** FILE SYSTEM WAS MODIFIED *****
 test_filesys: 11/16 files (0.0% non-contiguous), 9/100 blocks