From: Al Viro <viro@ftp.linux.org.uk>
To: jonathan@jonmasters.org
Cc: Andrew Morton <akpm@osdl.org>, linux-kernel@vger.kernel.org
Subject: Re: PATCH: fix-readonly-policy-use-and-floppy-ro-rw-status
Date: Sat, 5 Nov 2005 19:01:30 +0000 [thread overview]
Message-ID: <20051105190130.GP7992@ftp.linux.org.uk> (raw)
In-Reply-To: <35fb2e590511051051o16e3e763x821f12555261c4cc@mail.gmail.com>
On Sat, Nov 05, 2005 at 06:51:39PM +0000, Jon Masters wrote:
> On 11/5/05, Al Viro <viro@ftp.linux.org.uk> wrote:
> > On Sat, Nov 05, 2005 at 06:40:28PM +0000, Jon Masters wrote:
> > > And as I said, the situation as it stands leads to potential data
> > > corruption but I agree with you - we need a VFS callback to handle
> > > readwrite/readonly change on remount I think. Comments?
>
> > It's not that simple. Filesystem side of ro/rw transitions is
> > messy as hell
>
> Agreed.
>
> > "VFS callback" won't be enough.
>
> Although strangely enough other similar stuff in the remount path
> works just fine. I can already request that a filesystem gets
> remounted read-only - what's so wrong with forcing that behaviour when
> I ask for an impossible combination?
->remount_fs() certainly can refuse to go r/w - you don't need anything
new for that, just don't leave MS_RDONLY in *flags. The real trouble
starts when fs wants to go r/o on its own, e.g. when it sees an error
bad enough to warrant that. And that, BTW, is very likely to require
more than just one bit in ->policy - we want all IO on that device
to fail until after we actually close it during umount. As it is,
we can get anything, including block allocations (e.g. if we have
a dirty mapping and it gets written to disk). OTOH, we don't want
it to be the same thing as genuine hardware readonly - when buggered
fs is umounted, we are very likely to do fsck on it, after all.
next prev parent reply other threads:[~2005-11-05 19:01 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-11-05 18:27 Jon Masters
2005-11-05 18:33 ` Andrew Morton
2005-11-05 18:40 ` Jon Masters
2005-11-05 18:44 ` Al Viro
2005-11-05 18:51 ` Jon Masters
2005-11-05 19:01 ` Al Viro [this message]
2005-11-05 19:39 ` Jon Masters
2005-11-05 18:42 ` Al Viro
2005-11-05 18:48 ` Jon Masters
2005-11-05 18:41 ` Jeff Garzik
2005-11-06 10:59 ` Jon Masters
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=20051105190130.GP7992@ftp.linux.org.uk \
--to=viro@ftp.linux.org.uk \
--cc=akpm@osdl.org \
--cc=jonathan@jonmasters.org \
--cc=linux-kernel@vger.kernel.org \
/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®