From: Eric Sandeen <sandeen@redhat.com>
To: Phillip Susi <psusi@cfl.rr.com>
Cc: Samuel Thibault <samuel.thibault@ens-lyon.org>,
linux-ext4@vger.kernel.org, linux-kernel@vger.kernel.org,
joern@lazybastard.org, tytso@mit.edu
Subject: Re: Add a norecovery option to ext3/4?
Date: Tue, 10 Apr 2007 14:18:19 -0500 [thread overview]
Message-ID: <461BE2FB.5090101@redhat.com> (raw)
In-Reply-To: <461BDD48.2000904@cfl.rr.com>
Phillip Susi wrote:
> Eric Sandeen wrote:
>> It means the filesystem should not be writeable when it is mounted.
>> This is not the same as saying that the filesystem itself should do no
>> IO in the course of making that read-only mount available.
>
> I disagree.
>
>> I respectfully disagree, see above.
>
> Based on what? I argue that historically the primary use of the read
> only mount flag was to prevent the underlying filesystem from being
> modified and possibly damaged further before it can be fsck'ed. It
> became common practice to mount the root filesystem read only and run a
> fsck on it, then either reboot or remount read-write depending on if
> fsck had to make changes.
except in the case of a journaling filesystem, where the journal in
theory obviates the need for a fsck. (yes, I know... fsck still has a
place...) But, fsck is largely meaningless until the journal has been
recovered anyway (fs can only be consistent if it includes uncommited
transactions in the journal), so isn't this new territory?
I guess looking to the man page for clarification of intent is no help...
ro Mount the file system read-only.
> In this context, the meaning of the read only mount flag was clear: do
> not write to the disk. If you wish to redefine it as "do not allow me
> write access to any files" then you fly in the face of convention, and
> the onus is on you to provide a compelling argument to make such a change.
I'm admittedly playing devil's advocate here :) but what, in the
historical non-journalled filesystem case, would be writing to the
device anyway, if all IO from the vfs were stopped? Without the
journal, isn't vfs-ro the same as bdev-ro, largely?
As a counter example, if you had a filesystem which saves it's last
mount time in the superblock; should a ro mount not update that time?
(perhaps not, depending on how that timestamp was intended to be used.)
>> In that case you are mounting the same filesystem uner 2 different
>> operating systems simultaneously, which is, and always has been, a
>> recipe for disaster. Flagging the fs as "mounted already" would
>> probably be a better solution, though it's harder than it sounds at
>> first glance.
>
> No, it has not been. Prior to poorly behaved journal playback, it was
> perfectly safe to mount a filesystem read only even if it was mounted
> read-write by another system ( possibly fsck or defrag ). You might not
> read the correct data from it, but you would not damage the underlying
> data simply by mounting it read-only.
You might not damage the underlying filesystem, but you could sure go
off in the weeds trying to read it, if you stumbled upon some
half-updated metadata... so while it may be safe for the filesystem, I'm
not convinced that it's safe for the host reading the filesystem.
>> Under all conditions it should be safe to mount a read-only block
>> device, but that is not the same as mounting a filesystem read-only.
>
> Historically it was the same thing. I see no reason to change that
> behavior, do you?
but it's already changed, and has been in linux since ext3 came on the
scene. mount -o ro -does- replay the journal. Surely readonly does not
imply that we want a corrupted filesystem if it was not cleanly shut
down. I suppose there is a place for the argument that a readonly mount
of a journaled filesystem -should- present a recovered filesystem to the
user, without actually recovering the log to disk. I guess to me, it
hardly seems worth the effort, as the precedent is long set for doing
recovery on a read-only mount.
-Eric
next prev parent reply other threads:[~2007-04-10 19:21 UTC|newest]
Thread overview: 24+ messages / expand[flat|nested] mbox.gz Atom feed top
2007-04-09 0:05 Add a norecovery option to ext3/4? Samuel Thibault
2007-04-09 3:24 ` Eric Sandeen
2007-04-09 3:31 ` Samuel Thibault
2007-04-09 3:42 ` Eric Sandeen
2007-04-09 14:00 ` Theodore Tso
2007-04-09 4:29 ` Brad Campbell
2007-04-09 10:14 ` Andreas Dilger
2007-04-09 13:42 ` Valdis.Kletnieks
2007-04-09 16:37 ` Jan Engelhardt
2007-04-11 20:06 ` Pavel Machek
2007-04-09 15:43 ` Phillip Susi
2007-04-09 16:20 ` Kyle Moffett
2007-04-09 17:21 ` Eric Sandeen
2007-04-10 7:22 ` Jörn Engel
2007-04-10 11:27 ` Theodore Tso
2007-04-10 12:08 ` Jörn Engel
2007-04-10 16:44 ` Matt Mackall
2007-04-10 18:54 ` Phillip Susi
2007-04-10 19:18 ` Eric Sandeen [this message]
2007-04-10 22:04 ` Phillip Susi
2007-04-11 20:09 ` Bill Davidsen
2007-04-12 13:54 ` Benny Amorsen
2007-04-15 18:49 ` Pavel Machek
-- strict thread matches above, loose matches on Subject: below --
2007-05-03 9:07 Tomasz Chmielewski
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=461BE2FB.5090101@redhat.com \
--to=sandeen@redhat.com \
--cc=joern@lazybastard.org \
--cc=linux-ext4@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=psusi@cfl.rr.com \
--cc=samuel.thibault@ens-lyon.org \
--cc=tytso@mit.edu \
/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.