[PATCH] ext3: commit superblock before panicking

From: Eric Lammerts
Date: Tue Jan 18 2005 - 15:53:48 EST



Hi,
I have a problem with errors=panic on ext3. When a panic occurs, the
error event is not recorded anywhere. So after the reboot, e2fsck
doesn't kick in, the file system gets mounted again and the box panics
again...

Patch below moves the ERRORS_PANIC test down a bit so the journal is
aborted before panic() is called.

Eric


Signed-off-by: Eric Lammerts <eric@xxxxxxxxxxxx>

--- linux-2.6.10/fs/ext3/super.c.orig 2005-01-18 15:07:47.673128436 -0500
+++ linux-2.6.10/fs/ext3/super.c 2005-01-18 15:43:55.311501654 -0500
@@ -143,9 +143,6 @@
if (sb->s_flags & MS_RDONLY)
return;

- if (test_opt (sb, ERRORS_PANIC))
- panic ("EXT3-fs (device %s): panic forced after error\n",
- sb->s_id);
if (test_opt (sb, ERRORS_RO)) {
printk (KERN_CRIT "Remounting filesystem read-only\n");
sb->s_flags |= MS_RDONLY;
@@ -156,6 +153,9 @@
if (journal)
journal_abort(journal, -EIO);
}
+ if (test_opt (sb, ERRORS_PANIC))
+ panic ("EXT3-fs (device %s): panic forced after error\n",
+ sb->s_id);
ext3_commit_super(sb, es, 1);
}

-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/