Re: Checking page_count(page) in invalidate_complete_page

Andrew Morton
2006-09-25T22:53:23Z

On Mon, 25 Sep 2006 18:30:54 -0400
Chuck Lever <chuck.lever@oracle.com> wrote:

> It seems that the NFS client could now safely use a page cache
> invalidator that would wait for other page users to ensure that every
> page is invalidated properly, instead of skipping the pages that can't
> be immediately invalidated.
>
> In my opinion that would be the correct fix here for NFS.

OK. But unfortunately there isn't anything to wait *on*. It would require
a sleep-a-bit-then-retry loop, with something in there to prevent infinite
looping, and something else to handle the case where the
infinite-loop-preventor prevented an infinite loop. Which gets rather
nasty.

And block-backed direct-io needs the stronger invalidate_inode_pages2() as
well - right now it's subtly broken, only nobody has noticed yet.