From: "Chuck Lever" <chuck.lever@oracle.com>
To: "Aaron Straus" <aaron@merfinllc.com>
Cc: "Trond Myklebust" <trond.myklebust@fys.uio.no>,
"Hans-Peter Jansen" <hpj@urpla.net>,
linux-kernel@vger.kernel.org, "Neil Brown" <neilb@suse.de>,
"Linux NFS Mailing List" <linux-nfs@vger.kernel.org>
Subject: Re: [NFS] blocks of zeros (NULLs) in NFS files in kernels >= 2.6.20
Date: Mon, 22 Sep 2008 13:26:27 -0400 [thread overview]
Message-ID: <76bd70e30809221026g7bde774pbffa35881682ea4b@mail.gmail.com> (raw)
In-Reply-To: <20080922170414.GC12483@merfinllc.com>
On Mon, Sep 22, 2008 at 1:04 PM, Aaron Straus <aaron@merfinllc.com> wrote:
> Hi,
>
> On Sep 22 12:35 PM, Trond Myklebust wrote:
>> Revert _what_ exactly?
>
> Yep. I narrowed the problem down to an offending hunk in a particular
> patch. Removing that hunk did eliminate the problem. However,
> reverting that hunk is likely wrong and the code has changed _a lot_
> since that commit.
>
>> My understanding was that this is a consequence of unordered writes
>> causing the file to be extended while some other task is reading.
>
> Yes. I added some debugging statements to look at the writeout path.
>
> I think the following happens:
>
> - page 0 gets partially written to by app
> - VM writes out partial dirty page 0
> - page 0 gets fully written by app
> - page 1 gets partially written by app
> - VM writes out dirty page 1
>
> At this point there is a hole in the file. The tail end of page 0 is
> still not written to server.
>
> - VM writes out dirty page 0
> ...
>
>> AFAICS, this sort of behaviour has _always_ been possible. I can't see
>> how reverting anything will fix it.
>
> 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).
>
> 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?
Why can't you use O_SYNC | O_APPEND ?
--
Chuck Lever
next prev parent reply other threads:[~2008-09-22 17:26 UTC|newest]
Thread overview: 25+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-09-05 19:19 Aaron Straus
2008-09-05 19:56 ` [NFS] " Chuck Lever
2008-09-05 20:04 ` Aaron Straus
2008-09-05 20:36 ` Bernd Eckenfels
2008-09-05 20:36 ` Chuck Lever
2008-09-05 22:14 ` Aaron Straus
2008-09-06 0:03 ` Aaron Straus
2008-09-08 19:02 ` Aaron Straus
2008-09-08 21:15 ` Chuck Lever
2008-09-08 22:02 ` Aaron Straus
2008-09-09 19:46 ` Aaron Straus
2008-09-11 16:55 ` Chuck Lever
2008-09-11 17:19 ` Aaron Straus
2008-09-11 17:48 ` Chuck Lever
2008-09-11 18:49 ` Aaron Straus
2008-09-22 16:05 ` Hans-Peter Jansen
2008-09-22 16:35 ` Trond Myklebust
2008-09-22 17:04 ` Aaron Straus
2008-09-22 17:26 ` Chuck Lever [this message]
2008-09-22 17:37 ` Aaron Straus
2008-09-22 17:29 ` Trond Myklebust
2008-09-22 17:45 ` Aaron Straus
2008-09-22 18:43 ` Aaron Straus
2008-09-22 18:45 ` Hans-Peter Jansen
2008-09-22 18:45 ` Hans-Peter Jansen
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=76bd70e30809221026g7bde774pbffa35881682ea4b@mail.gmail.com \
--to=chuck.lever@oracle.com \
--cc=aaron@merfinllc.com \
--cc=chucklever@gmail.com \
--cc=hpj@urpla.net \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-nfs@vger.kernel.org \
--cc=neilb@suse.de \
--cc=trond.myklebust@fys.uio.no \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
Powered by JetHome