[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1222104541.7615.23.camel@localhost>
Date: Mon, 22 Sep 2008 13:29:01 -0400
From: Trond Myklebust <trond.myklebust@....uio.no>
To: Aaron Straus <aaron@...finllc.com>
Cc: Hans-Peter Jansen <hpj@...la.net>, linux-kernel@...r.kernel.org,
Chuck Lever <chuck.lever@...cle.com>,
Neil Brown <neilb@...e.de>,
Linux NFS Mailing List <linux-nfs@...r.kernel.org>
Subject: Re: [NFS] blocks of zeros (NULLs) in NFS files in kernels >= 2.6.20
On Mon, 2008-09-22 at 10:04 -0700, Aaron Straus wrote:
> Here is the crux. It was possible previously but unlikely e.g. our app
> never saw this behavior. The new writeout semantics causes visible
> holes in files often.
>
> Anyway, I agree the new writeout semantics are allowed and possibly
> saner than the previous writeout path. The problem is that it is
> __annoying__ for this use case (log files).
There is always the option of using syslog.
> I'm not sure if there is an easy solution. We want the VM to writeout
> the address space in order. Maybe we can start the scan for dirty
> pages at the last page we wrote out i.e. page 0 in the example above?
You can never guarantee that in a multi-threaded environment.
Two threads may, for instance, force 2 competing fsync() calls: that
again may cause out-of-order writes.
...and even if the client doesn't reorder the writes, the _server_ may
do it, since multiple nfsd threads may race when processing writes to
the same file.
Anyway, the patch to force a single threaded nfs client to write out the
data in order is trivial. See attachment...
Trond
Download attachment "linux-2.6.27-ordered_writes.dif" of type "message/rfc822" (750 bytes)
Powered by blists - more mailing lists