summaryrefslogtreecommitdiff
path: root/e2fsck
diff options
context:
space:
mode:
authorTheodore Ts'o <tytso@mit.edu>2002-10-31 18:38:55 -0500
committerTheodore Ts'o <tytso@mit.edu>2002-10-31 18:38:55 -0500
commitbe93ef0c14c11f9891094d66563d2998b917eb6c (patch)
tree9b267fb0fbeb651e5e9cc4454d84d93c9fcfec25 /e2fsck
parentf68b3b0bda2d9b2c884778a62fa43f345a4cd7c1 (diff)
downloade2fsprogs-be93ef0c14c11f9891094d66563d2998b917eb6c.tar.gz
pass1.c (e2fsck_pass1): Check the superblock write time to see
whether or not we can safely do the LOW_DTIME checks. (Addresses Sourceforge bug #620980)
Diffstat (limited to 'e2fsck')
-rw-r--r--e2fsck/ChangeLog6
-rw-r--r--e2fsck/pass1.c6
2 files changed, 11 insertions, 1 deletions
diff --git a/e2fsck/ChangeLog b/e2fsck/ChangeLog
index 9fbf8455..86d5c1bb 100644
--- a/e2fsck/ChangeLog
+++ b/e2fsck/ChangeLog
@@ -1,3 +1,9 @@
+2002-10-31 Theodore Ts'o <tytso@mit.edu>
+
+ * pass1.c (e2fsck_pass1): Check the superblock write time to see
+ whether or not we can safely do the LOW_DTIME checks.
+ (Addresses Sourceforge bug #620980)
+
2002-10-30 Theodore Ts'o <tytso@mit.edu>
* Makefile.in (install): Search all compression extensions when
diff --git a/e2fsck/pass1.c b/e2fsck/pass1.c
index f25be767..52cdb04c 100644
--- a/e2fsck/pass1.c
+++ b/e2fsck/pass1.c
@@ -272,6 +272,7 @@ void e2fsck_pass1(e2fsck_t ctx)
struct scan_callback_struct scan_struct;
struct ext2_super_block *sb = ctx->fs->super;
int imagic_fs;
+ int busted_fs_time = 0;
#ifdef RESOURCE_TRACK
init_resource_track(&rtrack);
@@ -394,6 +395,9 @@ void e2fsck_pass1(e2fsck_t ctx)
if (ctx->progress)
if ((ctx->progress)(ctx, 1, 0, ctx->fs->group_desc_count))
return;
+ if (fs->super->s_wtime < fs->super->s_inodes_count)
+ busted_fs_time = 1;
+
while (1) {
pctx.errcode = ext2fs_get_next_inode(scan, &ino, &inode);
if (ctx->flags & E2F_FLAG_SIGNAL_MASK)
@@ -543,7 +547,7 @@ void e2fsck_pass1(e2fsck_t ctx)
* than nothing. The right answer is that there
* shouldn't be any bugs in the orphan list handling. :-)
*/
- if (inode.i_dtime &&
+ if (inode.i_dtime && !busted_fs_time &&
inode.i_dtime < ctx->fs->super->s_inodes_count) {
if (fix_problem(ctx, PR_1_LOW_DTIME, &pctx)) {
inode.i_dtime = inode.i_links_count ?