Re: Stale NFS handles on 2.4.2
Neil Brown (neilb@cse.unsw.edu.au)
Thu, 1 Mar 2001 09:15:29 +1100 (EST)
On February 28, trond.myklebust@fys.uio.no wrote:
> >>>>> " " == Neil Brown <neilb@cse.unsw.edu.au> writes:
>
> > So... you can access things under /home/david, but you cannot
> > access /home/david itself? So, supposing that "fred" were some
> > file that you happen to know is in /home/david, then
>
> > ls /home/david fails with ESTALE and does not cause
> > any traffic to the server and
>
> This is normal. Once an inode gets flagged as being stale, then it
> remains stale. After all it would be a bug too if a filehandle were
> stale one moment, and then not the next.
>
I don't think that is necessarily a bug.
If I mis-configured the server to deny access to a particular client,
the client would start getting NFSERR_STALE responses. I notice the
problem and reconfigure the server and I would expect the ESTALE
errors to go away. But apparently they don't. Or atleast they don't
as long as the inode stays in the cache. Once it gets flushed from
the cache, a lookup will cause everything to work again.
But if an object below a "STALE" directory is being held open, the
inode will never get flushed and so the inode stays stale.
What is really odd about this situation is that whenever David tries
to access his home directory (/home/david) nfs_lookup_revalidate will
be called which will (if the cache isn't fresh enough) do a "lookup"
which returns the filehandle and attributes of /home/david. This
should be enough to convince the client that the filehandle isn't
stale anymore. However nfs_refresh_inode doesn't use this information
to clear the NFS_INO_STALE flag. Maybe it should.
In short, I really don't think that NFS_INO_STALE (or any other item
if information received from the server) should be considered to be
permanent and never rechecked.
NeilBrown
> The question here is therefore really why did the server tell us that
> the filehandle was stale in the first place.
>
> Cheers,
> Trond
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/