From: Theodore Tso <tytso@mit.edu>
To: Christoph Hellwig <hch@infradead.org>
Cc: Ext4 Developers List <linux-ext4@vger.kernel.org>,
Linux Kernel Developers List <linux-kernel@vger.kernel.org>,
Al Viro <viro@ZenIV.linux.org.uk>
Subject: Re: [PATCH 3/5] ext4: ext4_mark_recovery_complete() doesn't need to use lock_super
Date: Sun, 26 Apr 2009 07:46:08 -0400 [thread overview]
Message-ID: <20090426114608.GC10248@mit.edu> (raw)
In-Reply-To: <20090426070713.GA17022@infradead.org>
On Sun, Apr 26, 2009 at 03:07:14AM -0400, Christoph Hellwig wrote:
> On Sat, Apr 25, 2009 at 11:49:23PM -0400, Theodore Ts'o wrote:
> > The function ext4_mark_recovery_complete() is called from two call
> > paths: either (a) while mounting the filesystem, in which case there's
> > no danger of any other CPU calling write_super() until the mount is
> > completed, and (b) while remounting the filesystem read-write, in
> > which case the fs core has already locked the superblock, and in any
> > case write_super() wouldn't be called until the filesystem is
> > successfully changed from being mounted read-only to read-write.
>
> Currently ext4_remount releases/reqacquires lock_super around
> ext4_mark_recovery_complete, and unfortunately currently ->write_super
> can be called on a r/o filesystem (that's why we have the MS_RDONLY
> checks in all instance, I plan to clean that mess up).
That's true, but the patch also takes out the release/reacquire in in
ext4_remount (which was particularly ugly, belch). So even if
write_super gets called on an r/o filesystem (why?!?), we should be
safe because remount will hold lock_super() throughout the entire
remount operation.
We could delay this cleanup until you clean the mess with write_super,
but I don't think it would be harmful in removing the
lock_super()/unlock_super() pair in ext4_mark_recovery_complete(), and
the unlock_super()/lock_super() pair in ext4_remount before then. Am
I missing something?
- Ted
next prev parent reply other threads:[~2009-04-26 11:46 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-04-26 3:49 [PATCH RFC 0/5] Eliminate most lock_super() calls from ext4 Theodore Ts'o
2009-04-26 3:49 ` [PATCH 1/5] ext4: Avoid races caused by on-line resizing and SMP memory reordering Theodore Ts'o
2009-04-26 3:49 ` [PATCH 2/5] ext4: Remove outdated comment about lock_super() Theodore Ts'o
2009-04-26 3:49 ` [PATCH 3/5] ext4: ext4_mark_recovery_complete() doesn't need to use lock_super Theodore Ts'o
2009-04-26 3:49 ` [PATCH 4/5] ext4: Replace lock/unlock_super() with an explicit lock for the orphan list Theodore Ts'o
2009-04-26 3:49 ` [PATCH 5/5] ext4: Replace lock/unlock_super() with an explicit lock for resizing Theodore Ts'o
2009-04-28 16:02 ` Jan Kara
2009-04-28 15:52 ` [PATCH 4/5] ext4: Replace lock/unlock_super() with an explicit lock for the orphan list Jan Kara
2009-04-26 7:07 ` [PATCH 3/5] ext4: ext4_mark_recovery_complete() doesn't need to use lock_super Christoph Hellwig
2009-04-26 11:46 ` Theodore Tso [this message]
2009-04-26 11:49 ` Christoph Hellwig
2009-04-26 11:49 ` Christoph Hellwig
2009-04-28 16:13 ` [PATCH 2/5] ext4: Remove outdated comment about lock_super() Jan Kara
2009-04-28 16:23 ` [PATCH 1/5] ext4: Avoid races caused by on-line resizing and SMP memory reordering Jan Kara
2009-04-28 17:14 ` Theodore Tso
2009-04-29 9:28 ` Jan Kara
2009-04-29 9:28 ` Jan Kara
2009-05-01 13:55 ` [PATCH v2] " Theodore Ts'o
2009-05-03 17:08 ` Jan Kara
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=20090426114608.GC10248@mit.edu \
--to=tytso@mit.edu \
--cc=hch@infradead.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=viro@ZenIV.linux.org.uk \
/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 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.