Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 24 Oct 2009 01:29:24 +1100 (EST)
From:      Bruce Evans <brde@optusnet.com.au>
To:        Rick Macklem <rmacklem@uoguelph.ca>
Cc:        arch@FreeBSD.org, John Baldwin <jhb@FreeBSD.org>
Subject:   Re: Put a timeout on -ve name cache entries in NFS
Message-ID:  <20091024010347.D14674@delplex.bde.org>
In-Reply-To: <Pine.GSO.4.63.0910221034520.1537@muncher.cs.uoguelph.ca>
References:  <200910191634.30040.jhb@freebsd.org> <20091022182943.P13634@delplex.bde.org> <Pine.GSO.4.63.0910221034520.1537@muncher.cs.uoguelph.ca>

next in thread | previous in thread | raw e-mail | index | archive | help
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



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20091024010347.D14674>