From: Peng Tao <lkml.bergwolf@gmail.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: linux-kernel@vger.kernel.org
Subject: Re: Question about invalidate_inode_pages2_range()
Date: Mon, 19 Oct 2009 16:38:06 +0800 [thread overview]
Message-ID: <6149e97b0910190138k5791351dmc95d9cc636aaef2f@mail.gmail.com> (raw)
In-Reply-To: <1255940788.14447.7.camel@heimdal.trondhjem.org>
On Mon, Oct 19, 2009 at 4:26 PM, Trond Myklebust
<trond.myklebust@fys.uio.no> wrote:
> On Mon, 2009-10-19 at 16:16 +0800, Peng Tao wrote:
>> Hi,
>>
>> I've a question about invalidate_inode_pages2_range().
>>
>> When does invalidate_inode_pages2_range() returns -EBUSY? It locks and
>> writes back the page. Why invalidate_complete_page2() still may fail
>> due to page dirtiness?
>
> A lot of those requirements were set by NFS, which uses
> invalidate_inode_pages2() in order to invalidate the page cache when it
> detects that a file has been changed on the server (either due to an
> O_DIRECT write, or due to another client modifying the file).
>
> In such cases, you want to try to keep the dirty data by writing it out
> instead of discarding it.
Thanks for your quick response. But I have two more questions about this.
1. invalidate_inode_pages2_range() calls wait_on_page_writeback().
Does the latter actually write out the dirty page?
2. Is there any interface in the mm subsystem forces discarding a page cache?
Cheers,
Peng Tao
next prev parent reply other threads:[~2009-10-19 8:38 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 8:16 Peng Tao
2009-10-19 8:26 ` Trond Myklebust
2009-10-19 8:38 ` Peng Tao [this message]
2009-10-20 5:25 ` Trond Myklebust
2009-10-21 4:08 ` Peng Tao
2009-10-22 0:33 ` Trond Myklebust
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=6149e97b0910190138k5791351dmc95d9cc636aaef2f@mail.gmail.com \
--to=lkml.bergwolf@gmail.com \
--cc=linux-kernel@vger.kernel.org \
--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
all inboxes | Powered by JetHome®