unconditional ext2_flush() call. Also made ext2_flush() more
efficient when the superblock is modified after the filesystem has
been flushed, and make it clear the superblock dirty flag
after doing the superblock/block group descriptor flush.
+2001-07-10 Theodore Tso <tytso@valinux.com>
+
+ * journal.c (e2fsck_run_ext3_journal): Only call ext3_flush() if
+ the superblock is dirty.
+
2001-07-07 Theodore Tso <tytso@valinux.com>
* pass1b.c (pass1b, process_pass1b_block): Change the num_bad
return EXT2_ET_FILE_RO;
}
- ext2fs_flush(ctx->fs); /* Force out any modifications */
+ if (fs->flags & EXT2_FLAG_DIRTY)
+ ext2fs_flush(ctx->fs); /* Force out any modifications */
recover_retval = recover_ext3_journal(ctx);
+2001-07-10 Theodore Tso <tytso@valinux.com>
+
+ * closefs.c (write_primary_superblock): After writing changes to
+ the primary superblock, update the original superblock
+ copy so we don't have to re-write those changes in the
+ future.
+ (ext2fs_flush): Clear the superblock dirty flag after
+ we've flushed out changes to disk.
+
2001-07-07 Theodore Tso <tytso@valinux.com>
* bitops.h (ext2fs_find_first_bit_set): Use %esi instead of %ebx
if (retval)
return retval;
}
+ memcpy(fs->orig_super, super, SUPERBLOCK_SIZE);
return 0;
}
goto errout;
}
+ fs->flags &= ~EXT2_FLAG_DIRTY;
+
/*
* Flush the blocks out to disk
*/