Re: invalidate_inode_pages in 2.5.32/3

Andrew Morton
2002-09-12T21:33:31Z

Daniel Phillips wrote:
>
> ...
> > Is it not possible to co-opt a user process to perform the
> > invalidation? Just
> >
> > inode->is_kaput = 1;
> >
> > in rpciod?
>
> There must be a way. The key thing the VM needs to provide, and doesn't
> now, is a function callable by the rpciod that will report to the caller
> whether it was able to complete the invalidation without blocking. (I
> think I'm just rephrasing someone's earlier suggestion here.)
>
> I'm now thinking in general terms about how to concoct a mechanism
> that lets rpciod retry the invalidation later, for all those that turn
> out to be blocking. For example, rpciod could just keep a list of
> all pending invalidates and retry each inode on the list every time
> it has nothing to do. This is crude and n-squarish, but it would
> work. Maybe it's efficient enough for the time being. At least it's
> correct, which would be a step forward.

rpciod is the wrong process to be performing this operation. I'd suggest
the userspace process which wants to read the directory be used for this.

> Did you have some specific mechanism in mind?
>

Testing mapping->nrpages will tell you if the invalidation was successful.