Put a timeout on -ve name cache entries in NFS

Bruce Evans brde at optusnet.com.au
Fri Oct 23 14:29:29 UTC 2009


On Thu, 22 Oct 2009, Rick Macklem wrote:

> On Thu, 22 Oct 2009, Bruce Evans wrote:
>> One reason that I never committed my port of NetBSD's implementation of
>> negative cache entries for nfs is that I thought the timeout should be
>> a mount option but I didn't want to deal with the portability problems
>> from that.
>> 
> Just to clarify. Are you saying that, given no other system has such
> a mount option, you think the sysctl variable is an ok solution or
> that you think it should be a mount option and not a sysctl variable?

No; I think it should be a mount option.

> I'll admit that I'm biased because the sysctl variable is easier to
> do (and I don't think many people will need to twiddle it). I suggested
> it to John, mostly so that there was a way of disabling the -ve name
> caching, for the rare case where it might be causing someone grief.
> (That's what I think he meant by "safety belt".)

Mount options are harder to add (especially using nmount) but that is
not intrinsic (in 4.4BSD, sysctls were harder to add, but now they
have more infrastructure so they are easier to add).  It would almost
be easier to abuse sysctls for mount options (they would have to select
the mount instance).

My version actually just uses a hackish sysctl vfs.nfs.negcache (default:
enabled) to enable the negative name cache.  I don't have any timeout
control for it.

Bruce


More information about the freebsd-arch mailing list