xfs
[Top] [All Lists]

Re: review: fix remount vs barrier options

To: Christoph Hellwig <hch@xxxxxxxxxxxxx>
Subject: Re: review: fix remount vs barrier options
From: Nathan Scott <nathans@xxxxxxx>
Date: Wed, 26 Jul 2006 08:21:12 +1000
Cc: xfs@xxxxxxxxxxx, jeremy@xxxxxxx
In-reply-to: <20060725094438.GD29615@xxxxxxxxxxxxx>; from hch@xxxxxxxxxxxxx on Tue, Jul 25, 2006 at 10:44:38AM +0100
References: <20060721152807.D1998769@xxxxxxxxxxxxxxxxxxxxxxxx> <20060723190650.GA22180@xxxxxxxxxxxxx> <20060724100147.F2083275@xxxxxxxxxxxxxxxxxxxxxxxx> <20060724112737.D2085715@xxxxxxxxxxxxxxxxxxxxxxxx> <20060725094438.GD29615@xxxxxxxxxxxxx>
Sender: xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
Hi Christoph,

On Tue, Jul 25, 2006 at 10:44:38AM +0100, Christoph Hellwig wrote:
> ...
> The flag clearing changes look good.  But why is it okay to skip the
> ordered flag on the first block?  We want to make sure all previous I/O
> is finished before even doing the first log block write, don't we?

No, thats not necessary - Tim and I looked into this at length - the
way the split log write happens, we keep a count in the iclog struct
for this write (its initially 2); once the first write completes (and
this is guaranteed to be before the final write by the final write's
barrier), we atomically decrement that counter.  Once it reaches zero
(i.e. only one buffer completion was remaining, which is also the non-
split log write case) only then will we do any callback processing,
metadata unpinning, etc, etc.

So, its a safe and valid optimisation - otherwise we do an extra write
with barrier whenever we wrap around the physical log end.

Thanks for the reviews!

cheers.

-- 
Nathan


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