From: "Stephen C. Tweedie" <sct@redhat.com>
To: David Woodhouse <dwmw2@infradead.org>,
"Stephen C. Tweedie" <sct@redhat.com>,
Stefan Traby <stefan@hello-penguin.com>,
Daniel Phillips <phillips@innominate.de>,
Rik van Riel <riel@conectiva.com.br>,
linux-kernel@vger.kernel.org
Subject: Re: Journaling: Surviving or allowing unclean shutdown?
Date: Mon, 8 Jan 2001 12:02:49 +0000 [thread overview]
Message-ID: <20010108120249.J9321@redhat.com> (raw)
In-Reply-To: <20010104224946.C1290@redhat.com> <Pine.LNX.4.30.0101031253130.6567-100000@springhead.px.uk.com> <Pine.LNX.4.21.0101031325270.1403-100000@duckman.distro.conectiva> <3A5352ED.A263672D@innominate.de> <20010104192104.C2034@redhat.com> <20010104220821.B775@stefan.sime.com> <20010104224946.C1290@redhat.com> <1628.978695936@redhat.com> <20010106205726.A9664@cerebro.laendle>
In-Reply-To: <20010106205726.A9664@cerebro.laendle>; from pcg@goof.com on Sat, Jan 06, 2001 at 08:57:26PM +0100
Hi,
On Sat, Jan 06, 2001 at 08:57:26PM +0100, Marc Lehmann wrote:
> On Fri, Jan 05, 2001 at 11:58:56AM +0000, David Woodhouse <dwmw2@infradead.org> wrote:
> > You mount it read-only, recover as much as possible from it, and bin it.
> >
> > You _don't_ want the fs code to ignore your explicit instructions not to
> > write to the medium, and to destroy whatever data were left.
>
> The problem is: where did you give the explicit instruction? Just that you
> define "read-only" as "the medium should not be written" does not mean
> everybody else thinks the same.
>
> actually, I regard "ro" mainly as a "hey kernel, I won't handle writes
> now, so please don't try it", like for cd-roms or other non-writeale
> media, and please filesystem stay in a clean state.
Right. There are two distinct meanings:
1) Do not write to this medium, ever (physical readonly); and
2) Do not allow modifications to the filesystem (logical readonly).
The fact is that the kernel confuses the two, but that just isn't
always legitimate. Filesystems may want to do things like garbage
collection or defragmentation in the background even when there is no
appplication write activity.
We just don't have a way of specifying these two things independently.
A journaled filesystem can only be dirty if it was in the middle of
write activity, so mounting an unclean filesystem physically readonly
is not much different from suddenly making the underlying media
readonly during active service: of _course_ the filesystem is going to
get upset!
> That ro means "the medium is never written" is an assumption that does not
> hold for most disks anyway and is, in the case of journlaing filesystems,
> often impossible to implement. You simply can't salvage data without a log
> reply. Sure, you can do virtual log replays, but for example the reiserfs
> log is currently 32mb. Pinning down that much memory for a virtual log
> reply is not possible on low-memory machines.
You don't have to: it is theoretically possible to scan the journal
and create a mapping from physical blocks on the rest of the
filesystem to journal entries. The filesystem can then read from the
log whenever a replayable block is accessed.
However, this imposes a lookup cost on all accesses in the filesystem
even when we aren't in this virtual translating mode, so it's not a
cost I'd want to add unnecessarily.
The bottom line is that journaling and recovery both require write
access for now. I might implement an emergency readonly mount mode,
but I'm not going to make it particularly streamlined at the cost of
slowing down normal mounts.
Cheers,
Stephen
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
Please read the FAQ at http://www.tux.org/lkml/
next prev parent reply other threads:[~2001-01-08 12:06 UTC|newest]
Thread overview: 58+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-01-03 12:55 Journaling: Surviving or allowing unclean shutdown? Dr. David Gilbert
2001-01-03 15:26 ` Rik van Riel
2001-01-03 15:38 ` Michael Rothwell
2001-01-03 16:18 ` Andi Kleen
2001-01-03 16:27 ` Daniel Phillips
2001-01-03 16:42 ` Alex Belits
2001-01-04 8:00 ` Daniel Phillips
2001-01-04 17:39 ` Alex Belits
2001-01-03 18:52 ` Dr. David Gilbert
2001-01-04 9:57 ` Helge Hafting
2001-01-04 10:14 ` Daniel Phillips
2001-01-04 10:25 ` David Woodhouse
2001-01-04 17:43 ` David Lang
2001-01-04 17:52 ` David Woodhouse
2001-01-04 18:00 ` David Lang
2001-01-04 18:11 ` Alan Cox
2001-01-05 4:12 ` Chipzz
2001-01-05 4:18 ` Alan Cox
2001-01-05 16:55 ` Mike Touloumtzis
2001-01-05 16:57 ` David Woodhouse
2001-01-05 22:09 ` Pavel Machek
2001-01-04 17:59 ` Alan Cox
2001-01-04 18:10 ` Chris Wedgwood
2001-01-04 18:15 ` Mo McKinlay
2001-01-04 18:19 ` David Lang
2001-01-04 18:20 ` Mo McKinlay
2001-01-04 19:42 ` Richard B. Johnson
2001-01-04 20:31 ` egger
2001-01-04 20:59 ` Richard B. Johnson
2001-01-04 21:05 ` egger
2001-01-04 22:45 ` Erik Mouw
2001-01-04 18:23 ` Chris Wedgwood
2001-01-05 12:04 ` David Woodhouse
2001-01-04 18:21 ` Dr. David Gilbert
2001-01-04 18:11 ` Mo McKinlay
2001-01-04 21:00 ` Brett G. Person
2001-01-05 22:05 ` Pavel Machek
2001-01-04 19:21 ` Stephen C. Tweedie
2001-01-04 21:08 ` Stefan Traby
2001-01-04 22:49 ` Stephen C. Tweedie
2001-01-05 1:01 ` Stefan Traby
2001-01-05 8:10 ` Andreas Dilger
2001-01-05 11:05 ` Stephen C. Tweedie
2001-01-05 11:58 ` David Woodhouse
2001-01-06 19:57 ` Marc Lehmann
2001-01-06 20:09 ` Stefan Traby
2001-01-06 20:35 ` Chris Mason
2001-01-06 21:49 ` Marc Lehmann
2001-01-08 12:02 ` Stephen C. Tweedie [this message]
2001-01-09 9:34 ` Roger Gammans
2001-01-05 0:31 ` Daniel Phillips
2001-01-05 8:00 ` Andreas Dilger
2001-01-05 12:46 ` Alan Cox
2001-01-05 12:59 ` Chris Wedgwood
2001-01-05 13:22 ` Stephen C. Tweedie
2001-01-05 10:31 ` Stephen C. Tweedie
[not found] <fa.e3022cv.v2ucim@ifi.uio.no>
[not found] ` <fa.naq8vev.74ai08@ifi.uio.no>
2001-01-04 22:38 ` Dan Maas
-- strict thread matches above, loose matches on Subject: below --
2001-01-08 23:19 Bernd Eckenfels
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=20010108120249.J9321@redhat.com \
--to=sct@redhat.com \
--cc=dwmw2@infradead.org \
--cc=linux-kernel@vger.kernel.org \
--cc=phillips@innominate.de \
--cc=riel@conectiva.com.br \
--cc=stefan@hello-penguin.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