From: Ernie Petrides <petrides@redhat.com>
To: Stephen Tweedie <sct@redhat.com>, Andrew Morton <akpm@digeo.com>
Cc: linux-kernel@vger.kernel.org
Subject: [PATCH] 2.5.68 fs/ext3/super.c fix for orphan recovery error path
Date: Mon, 21 Apr 2003 16:14:04 -0400 [thread overview]
Message-ID: <200304212014.h3LKE4bP002830@pasta.boston.redhat.com> (raw)
Stephen/Andrew, please consider applying this patch to reverse the order
of checks in ext3_orphan_cleanup() for read-only mounts and prior errors.
The problem resolved by this patch is that if a root file system has an
error recorded from a previous mount, and then (when rebooting) the orphan
recovery procedure is initiated, the recovery is correctly skipped but the
file system is incorrectly left in a writable state.
This causes the subsequent fsck to fail due to the root file system
being dirty, and then requires manual intervention to get the system
fully booted.
Thanks in advance. -ernie
diff -urpN linux-2.5.68/fs/ext3/super.c{.orig,}
--- linux-2.5.68/fs/ext3/super.c.orig 2003-04-19 22:50:47.000000000 -0400
+++ linux-2.5.68/fs/ext3/super.c 2003-04-21 15:18:08.000000000 -0400
@@ -982,12 +982,6 @@ static void ext3_orphan_cleanup (struct
return;
}
- if (s_flags & MS_RDONLY) {
- printk(KERN_INFO "EXT3-fs: %s: orphan cleanup on readonly fs\n",
- sb->s_id);
- sb->s_flags &= ~MS_RDONLY;
- }
-
if (EXT3_SB(sb)->s_mount_state & EXT3_ERROR_FS) {
if (es->s_last_orphan)
jbd_debug(1, "Errors on filesystem, "
@@ -997,6 +991,12 @@ static void ext3_orphan_cleanup (struct
return;
}
+ if (s_flags & MS_RDONLY) {
+ printk(KERN_INFO "EXT3-fs: %s: orphan cleanup on readonly fs\n",
+ sb->s_id);
+ sb->s_flags &= ~MS_RDONLY;
+ }
+
while (es->s_last_orphan) {
struct inode *inode;
next reply other threads:[~2003-04-21 19:59 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2003-04-21 20:14 Ernie Petrides [this message]
2003-04-21 22:08 ` Andrew Morton
2003-04-28 14:23 ` Stephen C. Tweedie
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=200304212014.h3LKE4bP002830@pasta.boston.redhat.com \
--to=petrides@redhat.com \
--cc=akpm@digeo.com \
--cc=linux-kernel@vger.kernel.org \
--cc=sct@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®