xfs
[Top] [All Lists]

Re: XFS write cache flush policy

To: Matthias Schniedermeyer <ms@xxxxxxx>
Subject: Re: XFS write cache flush policy
From: Dave Chinner <david@xxxxxxxxxxxxx>
Date: Mon, 17 Dec 2012 07:48:47 +1100
Cc: Lin Li <sdeber@xxxxxxxxx>, Eric Sandeen <sandeen@xxxxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20121216111046.GA16756@xxxxxxx>
References: <CAA_rkDfFUmZzT_kMznsTSNVxdfqfmz=bmJ400wdBOzocgP32eA@xxxxxxxxxxxxxx> <20121208192927.GA17875@xxxxxxx> <20121210005820.GG15784@dastard> <20121210091239.GA21114@xxxxxxx> <50C64C17.9080206@xxxxxxxxxxx> <20121214111924.GA4762@xxxxxxx> <20121215221622.GF9806@dastard> <20121216103025.GA14880@xxxxxxx> <20121216111046.GA16756@xxxxxxx>
User-agent: Mutt/1.5.21 (2010-09-15)
On Sun, Dec 16, 2012 at 12:10:46PM +0100, Matthias Schniedermeyer wrote:
> On 16.12.2012 11:30, Matthias Schniedermeyer wrote:
> > On 16.12.2012 09:16, Dave Chinner wrote:
> > > 
> > > Like most amateurs you've jump to the obvious conclusion without
> > > considering all the other possibilities that could give the same
> > > result.
> > 
> > I have a test-case, so you can cut out the amateur.

Yes, I understand your test case. That doesn't mean I can reproduce
your problem, or have the time to do so.  I'm asking you to give me
information because you can obviously reproduce the problem reliably
and I've got a bunch of other stuff to do at the same time. There's
one of me, and a lot of you (users), and I simply don't scale to
doing everything myself.

> > Partition is 100GB at the beginning of a 1,5TB SATA HDD connected by 
> > USB3 enclosure:
> > Machine has 4GB of memory and is running a vanilla 3.7.0 kernel.
> > 
> > mkfs.xfs -l size=1024b -s size=4096 /dev/sdb1

If you use the defaults, does the problem go away?

> > mount /dev/sdb1 /mnt
> > mkdir /mnt/a
> > cd /mnt/a
> > for dat in `seq 1 40`; do dd if=/dev/zero of=$dat bs=1k count=900k ; done
> > 
> > Then i started a timer and waited for 5 minutes.
> > Then i yanked out the cable, my machine was writing to the 24th file at 
> > that point.
> > 
> > umount /mnt
> > <replug cable>
> > mount /dev/sdb1 /mnt
> > ls -l /mnt
> > <In words: Nothing there, not even a>

Can you provide the information I asked - what was there before the
unmount, what is there before recovery, what is there after
recovery? And depending on what occurred, send me the log file so I
can see what was actually supposed to be replayed by log recovery?

> Variant 3.
> Same as 2, but with a 'sync' after the for-loop.
> After 'sync' returns, i immediatly yank out the cable.
> After replugging the result is as expect, the directroy and all files 
> exist.

And when you tell the system to write everything, it works just
fine because it forces the log to a consistent state for recovery
purposes.

> So as far as i can tell, currently there is a 'sync' missing somewhere.

No, we don't know what they problem is yet.

> Could it be the removal of pdflush?

Which happened in 2.6.32, so is rather unlikely.

Cheers,

Dave.
-- 
Dave Chinner
david@xxxxxxxxxxxxx

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