lists.openwall.net   lists  /  announce  owl-users  owl-dev  john-users  john-dev  passwdqc-users  yescrypt  popa3d-users  /  oss-security  kernel-hardening  musl  sabotage  tlsify  passwords  /  crypt-dev  xvendor  /  Bugtraq  Full-Disclosure  linux-kernel  linux-netdev  linux-ext4  linux-hardening  linux-cve-announce  PHC 
Open Source and information security mailing list archives
 
Hash Suite: Windows password security audit tool. GUI, reports in PDF.
[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <1256016346.12592.15.camel@heimdal.trondhjem.org>
Date:	Tue, 20 Oct 2009 14:25:46 +0900
From:	Trond Myklebust <trond.myklebust@....uio.no>
To:	Peng Tao <lkml.bergwolf@...il.com>
Cc:	linux-kernel@...r.kernel.org
Subject: Re: Question about invalidate_inode_pages2_range()

On Mon, 2009-10-19 at 16:38 +0800, Peng Tao wrote:
> On Mon, Oct 19, 2009 at 4:26 PM, Trond Myklebust
> <trond.myklebust@....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?

No. It just waits for any outstanding writeback activity on that page to
finish.

> 2. Is there any interface in the mm subsystem forces discarding a page cache?

You mean that also discards dirty pages? Yes. That is what
truncate_inode_pages() does...


--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@...r.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Please read the FAQ at  http://www.tux.org/lkml/

Powered by blists - more mailing lists

Powered by Openwall GNU/*/Linux Powered by OpenVZ