From: Peter Staubach <staubach@redhat.com>
To: Kenny Simpson <theonetruekenny@yahoo.com>
Cc: linux-kernel@vger.kernel.org
Subject: Re: another nfs puzzle
Date: Wed, 07 Dec 2005 09:01:19 -0500 [thread overview]
Message-ID: <4396EB2F.3060404@redhat.com> (raw)
In-Reply-To: <20051206220448.82860.qmail@web34109.mail.mud.yahoo.com>
Kenny Simpson wrote:
>Hi again,
> I am seeing some odd behavior with O_DIRECT. If a file opened with O_DIRECT has a page mmap'd,
>and the file is extended via pwrite, then the mmap'd region seems to get lost - i.e. it neither
>takes up system memory, nor does it get written out.
>
>
I don't think that I understand why or how the kernel allows a file,
which was opened with O_DIRECT, to be mmap'd. The use of O_DIRECT
implies no caching and mmap implies the use of caching.
I do understand that the kernel can flush and invalidate pages in
the ranges of the i/o operations done, but does it really guarantee
that a pagein operation won't happen on a page within the range of
a region of the file being written to using direct i/o? If it does
not, then any consistency guarantees are gone and data corruption
can occur.
Thanx...
ps
next prev parent reply other threads:[~2005-12-07 14:01 UTC|newest]
Thread overview: 12+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-12-06 22:04 another nfs puzzle Kenny Simpson
2005-12-07 3:24 ` Trond Myklebust
2005-12-07 14:50 ` Kenny Simpson
2005-12-07 14:01 ` Peter Staubach [this message]
2005-12-07 14:11 ` Trond Myklebust
2005-12-07 14:18 ` Peter Staubach
2005-12-07 14:34 ` Trond Myklebust
2005-12-07 15:34 ` Peter Staubach
2005-12-07 15:41 ` Trond Myklebust
2005-12-07 15:56 ` Peter Staubach
2005-12-07 16:09 ` Trond Myklebust
2005-12-07 16:39 ` Peter Staubach
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=4396EB2F.3060404@redhat.com \
--to=staubach@redhat.com \
--cc=linux-kernel@vger.kernel.org \
--cc=theonetruekenny@yahoo.com \
/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