public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: <pcg@goof.com ( Marc) (A.) (Lehmann )>
To: Lenny Foner <foner-reiserfs@media.mit.edu>
Cc: sct@redhat.com, Nikita@Namesys.COM, Mason@Suse.COM,
	linux-kernel@vger.kernel.org, reiserfs-list@Namesys.COM
Subject: Re: [reiserfs-list] ReiserFS data corruption in very simple configuration
Date: Sat, 29 Sep 2001 14:52:29 +0200	[thread overview]
Message-ID: <20010929145229.C26231@schmorp.de> (raw)
In-Reply-To: <20010925142854.A5384@redhat.com> <200109290444.AAA19624@out-of-band.media.mit.edu>
In-Reply-To: <200109290444.AAA19624@out-of-band.media.mit.edu>

On Sat, Sep 29, 2001 at 12:44:59AM -0400, Lenny Foner <foner-reiserfs@media.mit.edu> wrote:
> isn't fixed by fsck?  [See outcome (d) below.]  I'm having difficulty
> believing how this can be possible for a non-journalling filesystem.

If you have difficulties in believing this, may I ask you how you think it
is possible for a non-journaling filesystem to prevent this at all?

> But what about written to the wrong files?  See below.

What you see is most probably *old* data, not data from another (still
existing) file.

> has not happened yet.  (I don't know how often reiserfs will be synced
> by default; 60 seconds?  Longer?  Presumably running "sync" will force

mostly like with any other filesystem (man bdflush)

> Now, we have the following possibilities for the outcome after the

> (a) Metadata correctly written, file data correctly written.

all filesystems ;)

> (b) Metadata correctly written, file data partially written.
>     (E.g., one or both files might have been partially or completely
>     updated.) 

ext2, reiserfs.

> (c) Metadata correctly written, file data completely unwritten.
>     (Neither file got updated at all.)

ext2, reiserfs.
   
> (d) Metadata correctly written, FILE DATA INTERCHANGED BETWEEN A AND B.

this shouldn't happen on reiserfs. however, the unwritten parts of file a can easily
contain data formerly in file b.

> (e) Metadata corrupted in some fashion, file data undefined.
>     ("Undefined" means could be any of (a) through (d) above; I don't care.)

this should be prevented by journaling (of course, this won't help against
harddisk failures) on reiserfs. ext2 often has this problem, but fsck usually
can repair it. it's easy to tell metadata from filedata on ext2.

> whether we can "guarantee that all the data blocks have been written",
> but may be missing the point I was making, namely that THE BLOCKS HAVE
> BEEN WRITTEN TO THE WRONG FILES.

remember that the blocks have previous content, and reiserfs' tails
optimization means that files appended all the time (wtmp) can move around
rapidly (at least their tail).

> P.P.S.  I say reset and not power-off, although I hope that this is
> moot, because I presume that the unsynced data, by virtue of being
> unsynced, is nowhere near the disk datapaths anyway.

this can make a big difference. many disks (ibm, maxtor) nowadays write
partial blocks on power outage, this gives "Uncorrectable read errors",
which is fatal, because no filesystem so far can work around this. It's
easy to repair (just rewrite the block), but would requite filesystem
feedback (hey, reisrefs, this metadata block is *garbage*).

> a reset should let the disks continue to write data out of their write
> buffers, assuming that a CPU reset doesn't flush such pending

they should, yes. OTOH, ide disks are cheap...

> not matter; is it common that disks might leave data buffered but
> unwritten for 30 seconds if there is no other disk activity?  I would

no. and it doesn't make sense. but it's not forbidden or sth.

-- 
      -----==-                                             |
      ----==-- _                                           |
      ---==---(_)__  __ ____  __       Marc Lehmann      +--
      --==---/ / _ \/ // /\ \/ /       pcg@goof.com      |e|
      -=====/_/_//_/\_,_/ /_/\_\       XX11-RIPE         --+
    The choice of a GNU generation                       |
                                                         |

  reply	other threads:[~2001-09-29 12:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-09-22 10:00 ReiserFS data corruption in very simple configuration foner-reiserfs
2001-09-22 12:47 ` Nikita Danilov
2001-09-22 20:44   ` foner-reiserfs
2001-09-25 13:28     ` Stephen C. Tweedie
2001-09-29  4:44       ` Lenny Foner
2001-09-29 12:52         ` Lehmann  [this message]
2001-10-01  1:00           ` [reiserfs-list] " foner-reiserfs
2001-10-01  1:26             ` Lehmann 
2001-10-01  2:32               ` foner-reiserfs
2001-10-03 16:28               ` Toby Dickenson
2001-10-01 11:30         ` Stephen C. Tweedie
2001-09-24  9:25   ` [reiserfs-list] " Jens Benecke
2001-10-14 14:52     ` Chris Mason
2001-10-14 18:19       ` Jens Benecke
2001-10-14 20:04         ` Hans Reiser
2001-10-14 23:32         ` Bernd Eckenfels
2001-09-25 20:13   ` Mike Fedyk
2001-09-26 14:43     ` Stephen C. Tweedie
2001-10-01  3:38       ` Mike Fedyk
2001-10-03 16:14         ` Stephen C. Tweedie
2001-10-01 15:27 ` Hans Reiser
2001-10-03 16:17   ` Stephen C. Tweedie
2001-10-03 20:06     ` Pascal Schmidt
2001-10-04 11:02       ` Stephen C. Tweedie

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=20010929145229.C26231@schmorp.de \
    --to=pcg@goof.com \
    --cc=Mason@Suse.COM \
    --cc=Nikita@Namesys.COM \
    --cc=foner-reiserfs@media.mit.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=reiserfs-list@Namesys.COM \
    --cc=sct@redhat.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