[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]

[PATCH] ext3: commit superblock before panicking



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 lammerts org>

--- 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);
 }


[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]