linux-ext4.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: akpm@osdl.org
To: sandeen@redhat.com, linux-ext4@vger.kernel.org,
	mm-commits@vger.kernel.org
Subject: - ext3-4-dont-do-orphan-processing-on-readonly-devices.patch removed from -mm tree
Date: Fri, 08 Dec 2006 00:33:08 -0800	[thread overview]
Message-ID: <200612080833.kB88X83F013527@shell0.pdx.osdl.net> (raw)


The patch titled
     ext3/4: don't do orphan processing on readonly devices
has been removed from the -mm tree.  Its filename was
     ext3-4-dont-do-orphan-processing-on-readonly-devices.patch

This patch was dropped because it was merged into mainline or a subsystem tree

------------------------------------------------------
Subject: ext3/4: don't do orphan processing on readonly devices
From: Eric Sandeen <sandeen@redhat.com>

If you do something like:

# touch foo
# tail -f foo &
# rm foo
# <take snapshot>
# <mount snapshot>

you'll panic, because ext3/4 tries to do orphan list processing on the
readonly snapshot device, and:

kernel: journal commit I/O error
kernel: Assertion failure in journal_flush_Rsmp_e2f189ce() at journal.c:1356: "!journal->j_checkpoint_transactions"
kernel: Kernel panic: Fatal exception

for a truly readonly underlying device, it's reasonable and necessary
to just skip orphan list processing.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Cc: <linux-ext4@vger.kernel.org>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 fs/ext3/super.c |    6 ++++++
 fs/ext4/super.c |    6 ++++++
 2 files changed, 12 insertions(+)

diff -puN fs/ext3/super.c~ext3-4-dont-do-orphan-processing-on-readonly-devices fs/ext3/super.c
--- a/fs/ext3/super.c~ext3-4-dont-do-orphan-processing-on-readonly-devices
+++ a/fs/ext3/super.c
@@ -1270,6 +1270,12 @@ static void ext3_orphan_cleanup (struct 
 		return;
 	}
 
+	if (bdev_read_only(sb->s_bdev)) {
+		printk(KERN_ERR "EXT3-fs: write access "
+			"unavailable, skipping orphan cleanup.\n");
+		return;
+	}
+
 	if (EXT3_SB(sb)->s_mount_state & EXT3_ERROR_FS) {
 		if (es->s_last_orphan)
 			jbd_debug(1, "Errors on filesystem, "
diff -puN fs/ext4/super.c~ext3-4-dont-do-orphan-processing-on-readonly-devices fs/ext4/super.c
--- a/fs/ext4/super.c~ext3-4-dont-do-orphan-processing-on-readonly-devices
+++ a/fs/ext4/super.c
@@ -1327,6 +1327,12 @@ static void ext4_orphan_cleanup (struct 
 		return;
 	}
 
+	if (bdev_read_only(sb->s_bdev)) {
+		printk(KERN_ERR "EXT4-fs: write access "
+			"unavailable, skipping orphan cleanup.\n");
+		return;
+	}
+
 	if (EXT4_SB(sb)->s_mount_state & EXT4_ERROR_FS) {
 		if (es->s_last_orphan)
 			jbd_debug(1, "Errors on filesystem, "
_

Patches currently in -mm which might be from sandeen@redhat.com are

origin.patch
ext3-4-dont-do-orphan-processing-on-readonly-devices.patch

                 reply	other threads:[~2006-12-08  8:33 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=200612080833.kB88X83F013527@shell0.pdx.osdl.net \
    --to=akpm@osdl.org \
    --cc=linux-ext4@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=sandeen@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;
as well as URLs for NNTP newsgroup(s).