+2003-01-02 Theodore Ts'o <tytso@mit.edu>
+
+ * unix.c (main): Detect if there is an attempt to run the journal
+ twice, and abort with an error if this is the case.
+ (Address IBM Bugzilla bug #1226)
+
2003-11-19 Theodore Ts'o <tytso@mit.edu>
* unix.c (PRS): Print an error if more than one of the -p/-a, -n
#define E2F_FLAG_JOURNAL_INODE 0x0080 /* Create a new ext3 journal inode */
#define E2F_FLAG_SB_SPECIFIED 0x0100 /* The superblock was explicitly
* specified by the user */
+#define E2F_FLAG_RESTARTED 0x0100 /* E2fsck has been restarted */
/*
* Defines for indicating the e2fsck pass number
"check.\n"));
io_channel_flush(ctx->fs->io);
} else {
+ if (ctx->flags & E2F_FLAG_RESTARTED) {
+ /*
+ * Whoops, we attempted to run the
+ * journal twice. This should never
+ * happen, unless the hardware or
+ * device driver is being bogus.
+ */
+ com_err(ctx->program_name, 0,
+ _("unable to set superblock flags on %s\n"), ctx->device_name);
+ fatal_error(ctx, 0);
+ }
retval = e2fsck_run_ext3_journal(ctx);
if (retval) {
com_err(ctx->program_name, retval,
}
ext2fs_close(ctx->fs);
ctx->fs = 0;
+ ctx->flags |= E2F_FLAG_RESTARTED;
goto restart;
}
}