]> git.ipfire.org Git - thirdparty/e2fsprogs.git/commitdiff
e2fsck: make the low dtime check consistent when using the backup superblock
authorTheodore Ts'o <tytso@mit.edu>
Mon, 2 Sep 2019 21:44:14 +0000 (17:44 -0400)
committerTheodore Ts'o <tytso@mit.edu>
Tue, 3 Sep 2019 00:40:45 +0000 (20:40 -0400)
The backup superblock may have a last mounted time of zero, if it has
never been updated since the file system was created.  In that case,
the low dtime check may get disabled when using the backup superblock,
even though subsequent e2fsck runs will end up using the low dtime
check.  This can cause a failure of ext4/007, since since when e2fsck
is run a second time after the file system is mounted, the low dtime
check will trigger the e2fsck complaint:

Inode NNNN was part of the orphaned inode list.  IGNORED.

Signed-off-by: Theodore Ts'o <tytso@mit.edu>
e2fsck/pass1.c
tests/f_no/expect
tests/f_yes/expect
tests/f_yesall/expect
tests/f_yesthenall/expect
tests/f_yesthenno/expect

index 524577ae93232ead6044300e44386cad4da74b41..2b5bfa3291699fc7212e4424a9eb6eb730231137 100644 (file)
@@ -1340,8 +1340,10 @@ void e2fsck_pass1(e2fsck_t ctx)
        if (ctx->progress && ((ctx->progress)(ctx, 1, 0,
                                              ctx->fs->group_desc_count)))
                goto endit;
-       if ((fs->super->s_wtime < fs->super->s_inodes_count) ||
-           (fs->super->s_mtime < fs->super->s_inodes_count) ||
+       if ((fs->super->s_wtime &&
+            fs->super->s_wtime < fs->super->s_inodes_count) ||
+           (fs->super->s_mtime &&
+            fs->super->s_mtime < fs->super->s_inodes_count) ||
            (fs->super->s_mkfs_time &&
             fs->super->s_mkfs_time < fs->super->s_inodes_count))
                low_dtime_check = 0;
index e7b619d538f176faf6eb1ab578c0a45876b703d6..140a01ff1098fc63e3b4dfefefddce6c602fb796 100644 (file)
@@ -12,6 +12,8 @@ Clear<y>? no
 Inode 13 has an invalid extent
        (logical block 0, invalid physical block 888888888888, len 1)
 Clear<y>? no
+Inodes that were part of a corrupted orphan linked list found.  Fix<y>? no
+Inode 14 was part of the orphaned inode list.  IGNORED.
 Inode 14 is in use, but has dtime set.  Fix<y>? no
 Inode 14 has an invalid extent
        (logical block 300, invalid physical block 777777777777, len 300)
index c73e620438bd12d674859676a2917460a8711117..93b04ef1b51d1bbb806bf22a7e27bac29b45ac6b 100644 (file)
@@ -12,7 +12,8 @@ Clear<y>? yes
 Inode 13 has an invalid extent
        (logical block 0, invalid physical block 888888888888, len 1)
 Clear<y>? yes
-Inode 14 is in use, but has dtime set.  Fix<y>? yes
+Inodes that were part of a corrupted orphan linked list found.  Fix<y>? yes
+Inode 14 was part of the orphaned inode list.  FIXED.
 Inode 14 has an invalid extent
        (logical block 300, invalid physical block 777777777777, len 300)
 Clear<y>? yes
index f6d3c2b8f38979c8a5d74352a8f1424257205768..757b048189d71ae935fee3dab8282ff5414b1666 100644 (file)
@@ -16,8 +16,9 @@ Inode 13 has an invalid extent
        (logical block 0, invalid physical block 888888888888, len 1)
 Clear? yes
 
-Inode 14 is in use, but has dtime set.  Fix? yes
+Inodes that were part of a corrupted orphan linked list found.  Fix? yes
 
+Inode 14 was part of the orphaned inode list.  FIXED.
 Inode 14 has an invalid extent
        (logical block 300, invalid physical block 777777777777, len 300)
 Clear? yes
index 1fc3bde634f6f0b532dc0a3662048b2c9520d08e..73f35a34d04c8e8433100505bf01216b723cb081 100644 (file)
@@ -12,7 +12,8 @@ Clear<y>? yes
 Inode 13 has an invalid extent
        (logical block 0, invalid physical block 888888888888, len 1)
 Clear<y>? yes
-Inode 14 is in use, but has dtime set.  Fix<y>? yes
+Inodes that were part of a corrupted orphan linked list found.  Fix<y>? yes
+Inode 14 was part of the orphaned inode list.  FIXED.
 Inode 14 has an invalid extent
        (logical block 300, invalid physical block 777777777777, len 300)
 Clear<y>? yes
index de55f47d32dfc535b7f7dd374bf4c8109e830ad9..94bcc6a8f62190c9c0b52c5ba530b6f870666d1f 100644 (file)
@@ -12,7 +12,8 @@ Clear<y>? yes
 Inode 13 has an invalid extent
        (logical block 0, invalid physical block 888888888888, len 1)
 Clear<y>? yes
-Inode 14 is in use, but has dtime set.  Fix<y>? yes
+Inodes that were part of a corrupted orphan linked list found.  Fix<y>? yes
+Inode 14 was part of the orphaned inode list.  FIXED.
 Inode 14 has an invalid extent
        (logical block 300, invalid physical block 777777777777, len 300)
 Clear<y>? yes