Re: NFS caching problems

Linus Torvalds (Linus.Torvalds@cs.helsinki.fi)
Sat, 9 Mar 1996 12:40:06 +0200


Jon Tombs: "Re: NFS caching problems" (Mar 7, 21:33):
> Matthias Urlichs said:
> >
> > My mail folder is mounted across NFS.
> >
> > This doesn't work.
> >
> > The problem seems to be that the last file block is partially filled, a=
> > nd
> > it is cached. If the file subsequently grows, I'll have an ugly block o=
> > f
> > NULLs in there until the cache times out. :-( The file's growth itself
> > seems to be noted by the client without problems.
> >
> > Any good ideas how to solve that? The problem isn't confined to mail
> > spools...
>
> I can confirm this problem, updating an open nfs file on a remote host
> results in corrupt files. I assume the nfs code should invalidate the
> cache whenever there is a change on the remote files attributes.

How does 1.3.72 work for you? It should be smarter at invalidating the
cache.

Note that we can never get 100% coherence with any caching scheme over
NFSv2, but we can certainly use a few heuristics to get _better_ cache
behaviour.

Linus