public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
From: Jens Axboe <axboe@suse.de>
To: Pavel Machek <pavel@suse.cz>
Cc: Junfeng Yang <yjf@stanford.edu>,
	Linux Kernel Mailing List <linux-kernel@vger.kernel.org>,
	ext2-devl@stanford.edu
Subject: Re: [CHECKER] crash after fsync causing serious FS corruptions (ext2, 2.6.11)
Date: Tue, 8 Mar 2005 12:04:32 +0100	[thread overview]
Message-ID: <20050308110432.GA13008@suse.de> (raw)
In-Reply-To: <20050308110200.GB23640@elf.ucw.cz>

On Tue, Mar 08 2005, Pavel Machek wrote:
> On Po 07-03-05 11:45:13, Jens Axboe wrote:
> > On Mon, Mar 07 2005, Junfeng Yang wrote:
> > > 
> > > Hi,
> > > 
> > > FiSC (our FS checker) issues a warning on ext2, complaining that crash
> > > after fsync causes file system to corrupt.  FS corrupts in two different
> > > ways: 1. file contains illegal blocks (such as block # -2) 2. one block
> > > owned by two different files.
> > > 
> > > I diagnosed the warning a little bit and it appears that this warning can
> > > be triggered by the following steps:
> > > 
> > > 1. a file is truncated, so several blocks are freed
> > > 2. a new file is created, and the blocks freed in step 1 are reused
> > > 3. fsync on the new file
> > > 4. crash and run fsck to recover.
> > > 
> > > fsync should guarantee that a specific file is persistent on disk.
> > > Presumably, operations on other files should not mess up with the file we
> > > just fsync (true ?)  However, I also understand that ext2 by default
> > > relies on e2fsck to provide file system consistency.  Do you guys consider
> > > the above warning as a bug or not?  Any clarification on this will be very
> > > helpful.
> > 
> > fsync on ext2 only really guarantees that the data has reached
> > the disk, what the disk does it outside the realm of the fs.
> > If the ide drive has write back caching enabled, the data just
> > might only be in cache. If the power is removed right after fsync
> > returns, the drive might not get a chance to actually commit the
> > write to platter.
> 
> I *think* they are using emulation for their checker, so drivers
> lying about writes should not be problem.

Yes, Junfeng informed me of that later.

-- 
Jens Axboe


  reply	other threads:[~2005-03-08 11:05 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-03-07  9:57 [CHECKER] crash after fsync causing serious FS corruptions (ext2, 2.6.11) Junfeng Yang
2005-03-07 10:45 ` Jens Axboe
2005-03-07 22:55   ` Junfeng Yang
2005-03-07 23:22     ` [Ext2-devel] " Andreas Dilger
2005-03-08  0:25       ` Junfeng Yang
2005-03-08 11:02   ` Pavel Machek
2005-03-08 11:04     ` Jens Axboe [this message]
2005-03-08 12:31 ` Theodore Ts'o
2005-03-08 20:27   ` Junfeng Yang
2005-03-09  7:19   ` --update-- " Junfeng Yang
2005-03-20  2:00   ` Bernd Eckenfels
     [not found] <3Fnc7-mf-11@gated-at.bofh.it>
     [not found] ` <3FnYi-11J-1@gated-at.bofh.it>
2005-03-08  0:49   ` Robert Hancock

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=20050308110432.GA13008@suse.de \
    --to=axboe@suse.de \
    --cc=ext2-devl@stanford.edu \
    --cc=linux-kernel@vger.kernel.org \
    --cc=pavel@suse.cz \
    --cc=yjf@stanford.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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox