Re: Question about invalidate_inode_pages2_range()
From: Trond Myklebust
Date: Wed Oct 21 2009 - 20:34:03 EST
On Wed, 2009-10-21 at 12:08 +0800, Peng Tao wrote:
> On Tue, Oct 20, 2009 at 1:25 PM, Trond Myklebust
> <trond.myklebust@xxxxxxxxxx> wrote:
> > On Mon, 2009-10-19 at 16:38 +0800, Peng Tao wrote:
> >> 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...
> But truncate_inode_pages() truncates all pages beyond lstart.
> Is there any way to discard a single page?
> truncate_inode_page() seems to be able to do the magic. But it is not exported.
truncate_inode_pages_range() is your friend...
Cheers
Trond
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/