From owner-freebsd-stable@FreeBSD.ORG Fri Jan 2 06:37:31 2015 Return-Path: Delivered-To: freebsd-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 2FD2A24E; Fri, 2 Jan 2015 06:37:31 +0000 (UTC) Received: from mippet.ci.com.au (mippet.ci.com.au [192.65.182.30]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client CN "mippet.ci.com.au", Issuer "Corinthian Engineering Certificate Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 9F2AA66D09; Fri, 2 Jan 2015 06:37:30 +0000 (UTC) Received: from odi.ci.com.au (odi.ci.com.au [192.168.1.7]) by mippet.ci.COM.AU (8.14.7/8.14.9/CE140428) with ESMTP id t026SGkY067000 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Fri, 2 Jan 2015 17:28:16 +1100 (AEDT) (envelope-from rpp@ci.com.au) Received: from odi.ci.com.au (localhost [127.0.0.1]) by odi.ci.com.au (8.14.7/8.14.7) with ESMTP id t026SGNp094369; Fri, 2 Jan 2015 17:28:16 +1100 (EST) (envelope-from rpp@odi.ci.com.au) Received: (from rpp@localhost) by odi.ci.com.au (8.14.7/8.14.7/Submit) id t026SGp4094368; Fri, 2 Jan 2015 17:28:16 +1100 (EST) (envelope-from rpp) Date: Fri, 2 Jan 2015 17:28:16 +1100 From: Richard Perini To: John Baldwin Subject: Re: NFS negative name caching and amd Message-ID: <20150102062816.GA94333@odi.ci.com.au> References: <20141221102746.GA11278@odi.ci.com.au> <201412221004.48504.jhb@freebsd.org> <20141222232527.GA52306@odi.ci.com.au> <2226907.ffl2dAmvtd@ralph.baldwin.cx> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <2226907.ffl2dAmvtd@ralph.baldwin.cx> Cc: freebsd-stable@freebsd.org X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 02 Jan 2015 06:37:31 -0000 On Sun, Dec 28, 2014 at 11:27:29AM -0500, John Baldwin wrote: > On Tuesday, December 23, 2014 10:25:27 AM Richard Perini wrote: > > I just ran up autofs and automountd on 10-stable, set the negnametimeo > > option in auto_master and it works a treat. However it will be quite > > some time before we're able to shift off 9 which leaves us with the > > kernel option as the easiest path. > > > > I'd point out that the nfs client code in > > /usr/src/sys/fs/nfsclient/nfsmount.h is already coded to allow override: > > > > ifndef NFS_DEFAULT_NEGNAMETIMEO > > #define NFS_DEFAULT_NEGNAMETIMEO 60 > > #endif > > > > so all that is required is the entry in the "options" file. Naturally > > we can add that ourselves (the beauty of open source :-) but it would > > be the only change to the native FreeBSD code for us, so of course > > we'd prefer to see it in the tree. > > > > Regards, and compliments of the season. > > I think for the future (10.x and later) the autofs solution is preferred, > so the option would be unused if added to HEAD. (I also think setting it > via autofs is preferable as it is better documented and is more fine-grained > since it is per-mount.) Given that, I would only add the option on 9.x. > However, I think there's another route you can use to set this option using a > stock source tree. First, you could set COPTFLAGS in /etc/src.conf and add > '-DNFS_DEFAULT_NEGNAMETIMEO=0' to it (e.g. set COPTFLAGS to > "-O2 -pipe -D the 'DEBUG' line in your kernel config since that is added to CFLAGS, so if > you have this in your config file: > > makeoptions DEBUG=-g # Build kernel with gdb(1) debug symbols > > you can add: > > makeoptions DEBUG+=-DNFS_DEFAULT_NEGNAMETIMEO=0 # Disable -ve name caching Thanks John, The makeoptions magic is the route we'll take. It was the solution I was looking for when I encountered the options file. --R