[Top] [All Lists]

Re: XFS write cache flush policy

To: Dave Chinner <david@xxxxxxxxxxxxx>
Subject: Re: XFS write cache flush policy
From: Matthias Schniedermeyer <ms@xxxxxxx>
Date: Sun, 16 Dec 2012 11:30:25 +0100
Cc: Eric Sandeen <sandeen@xxxxxxxxxxx>, Lin Li <sdeber@xxxxxxxxx>, xfs@xxxxxxxxxxx
In-reply-to: <20121215221622.GF9806@dastard>
References: <CAA_rkDfFUmZzT_kMznsTSNVxdfqfmz=bmJ400wdBOzocgP32eA@xxxxxxxxxxxxxx> <20121208192927.GA17875@xxxxxxx> <20121210005820.GG15784@dastard> <20121210091239.GA21114@xxxxxxx> <50C64C17.9080206@xxxxxxxxxxx> <20121214111924.GA4762@xxxxxxx> <20121215221622.GF9806@dastard>
User-agent: Mutt/1.5.21 (2010-09-15)
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.
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
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>

I tried it 3 times, all times with the same result that not even "a" was 

In the last run i did a `ls -l /mnt/a` at the 4 minute-point, it showed 
several files with 900MB.



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