All of lore.kernel.org
 help / color / mirror / Atom feed
From: akpm@linux-foundation.org
To: sandeen@redhat.com, sct@redhat.com, mm-commits@vger.kernel.org
Subject: - ext3-refuse-ro-to-rw-remount-of-fs-with-orphan.patch removed from -mm tree
Date: Sun, 11 Feb 2007 14:54:07 -0800	[thread overview]
Message-ID: <200702112254.l1BMs7ZA016170@shell0.pdx.osdl.net> (raw)


The patch titled
     ext3: refuse ro to rw remount of fs with orphan inodes
has been removed from the -mm tree.  Its filename was
     ext3-refuse-ro-to-rw-remount-of-fs-with-orphan.patch

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

------------------------------------------------------
Subject: ext3: refuse ro to rw remount of fs with orphan inodes
From: Eric Sandeen <sandeen@redhat.com>

In the rare case where we have skipped orphan inode processing due to a
readonly block device, and the block device subsequently changes back to
read-write, disallow a remount,rw transition of the filesystem when we have an
unprocessed orphan inodes as this would corrupt the list.

Ideally we should process the orphan inode list during the remount, but that's
trickier, and this plugs the hole for now.

Signed-off-by: Eric Sandeen <sandeen@redhat.com>
Cc: "Stephen C. Tweedie" <sct@redhat.com>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
---

 fs/ext3/super.c |   16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff -puN fs/ext3/super.c~ext3-refuse-ro-to-rw-remount-of-fs-with-orphan fs/ext3/super.c
--- a/fs/ext3/super.c~ext3-refuse-ro-to-rw-remount-of-fs-with-orphan
+++ a/fs/ext3/super.c
@@ -2344,6 +2344,22 @@ static int ext3_remount (struct super_bl
 				err = -EROFS;
 				goto restore_opts;
 			}
+
+			/*
+			 * If we have an unprocessed orphan list hanging
+			 * around from a previously readonly bdev mount,
+			 * require a full umount/remount for now.
+			 */
+			if (es->s_last_orphan) {
+				printk(KERN_WARNING "EXT3-fs: %s: couldn't "
+				       "remount RDWR because of unprocessed "
+				       "orphan inode list.  Please "
+				       "umount/remount instead.\n",
+				       sb->s_id);
+				err = -EINVAL;
+				goto restore_opts;
+			}
+
 			/*
 			 * Mounting a RDONLY partition read-write, so reread
 			 * and store the current valid flag.  (It may have
_

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

origin.patch

                 reply	other threads:[~2007-02-11 22:54 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=200702112254.l1BMs7ZA016170@shell0.pdx.osdl.net \
    --to=akpm@linux-foundation.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=mm-commits@vger.kernel.org \
    --cc=sandeen@redhat.com \
    --cc=sct@redhat.com \
    --subject='Re: - ext3-refuse-ro-to-rw-remount-of-fs-with-orphan.patch removed from -mm tree' \
    /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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.