xfs
[Top] [All Lists]

Re: Questions about XFS

To: Steve Bergman <sbergman27@xxxxxxxxx>
Subject: Re: Questions about XFS
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Wed, 12 Jun 2013 07:47:25 +1000
Cc: Eric Sandeen <sandeen@xxxxxxxxxxx>, Ric Wheeler <rwheeler@xxxxxxxxxx>, xfs@xxxxxxxxxxx
Delivered-to: xfs@xxxxxxxxxxx
In-reply-to: <CAO9HMNFj4Y8bEg3xZct0PTk_4wmGCtuNgFf4m4TR-PnZR_BrNQ@xxxxxxxxxxxxxx>
References: <loom.20130611T112155-970@xxxxxxxxxxxxxx> <51B72D3D.5010206@xxxxxxxxxx> <CAO9HMNGjdikgX+_434aGVJ2NAJ0hxDNLo+Vsa46GH3psXr4sKQ@xxxxxxxxxxxxxx> <51B75E42.4070105@xxxxxxxxxxx> <CAO9HMNFj4Y8bEg3xZct0PTk_4wmGCtuNgFf4m4TR-PnZR_BrNQ@xxxxxxxxxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Tue, Jun 11, 2013 at 02:17:16PM -0500, Steve Bergman wrote:
> Now about ext3 behavior. (Sorry, I know this is an XFS list, but I've
> been dying to have this clarified. And this does kind of relate to
> XFS.) Not only does data get flushed more frequently. But it gets
> careful treatment. It gets written out immediately before the
> metadata.

That's not careful treatment, that's just ordering. XFS has "careful
treatment", too, but it orders data and metadata differently.

XFS doesn't actually update the inode size until after
the data is written i.e. the size is still zero until the data is
written. That's how XFS orders data vs metadata updates - metadata
that is oly valid after data IO completes is not modified until
after the data IO completes...

Hence if you create a file, write some data and then crash before
the data is written, you'll get the create replayed but nothing else.
i.e. a zero length file. Often it is just the inode size transaction
that is missing from the log - the data is actually on disk and *can
be recovered* if you know what you are doing...

IOWs, the thing that causes people to complain about XFS and zero
length files is that XFS leaves *observable evidence* of data loss
behind, while ext3 and ext4 don't. Hence when people switch to XFS
they actually notice (maybe for the first time!) that running their
laptop battery dead leads to data loss and that their applications
are not behaving safely. They then shoot the messenger (i.e XFS)
for losing data as ext3/ext4 don't "lose data" as they don't leave
any observable evidence of partial file states...

Filesystems behave differently, but those observable differences in
behaviour don't mean one filesystem loses more data than another.
Some filesystems just makes it easier to find evidence of such data
loss and hence make it easier to recover from, not to mention make
it obvious which applications write data unsafely and hence
shouldn't be trusted....

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>