Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Sep 2005 21:06:12 -0600
From:      Scott Long <scottl@samsco.org>
To:        Erez Zadok <ezk@cs.sunysb.edu>
Cc:        freebsd-fs@freebsd.org, christos@zoulas.com, Kris Kennaway <kris@obsecurity.org>
Subject:   Re: turning off the NFS attribute cache
Message-ID:  <432E2B24.5040607@samsco.org>
In-Reply-To: <200509190225.j8J2PclG016625@agora.fsl.cs.sunysb.edu>
References:  <200509190225.j8J2PclG016625@agora.fsl.cs.sunysb.edu>

next in thread | previous in thread | raw e-mail | index | archive | help
Erez Zadok wrote:
> Good news!
> 
> After browsing the 6.0 kernel sources, I found out that freebsd DOES indeed
> have a way of turning off the attribute cache.  It's not enough to just set
> nfs_args->acregmin and friends, but you also need to
> 
> 	nfs_args->flags |= NFSMNT_ACREGMIN
> 
> Otherwise, the kernel ignores what you set in the ->acregmin field.  So, to
> completely turn off the attrcache on freebsd, you have to set four fields in
> struct nfs_args to 0, and turn four flags on in ->flags.
> 
> It's cumbersome, but it works.  You may still want to consider offering a
> "noac" flag for convenience, which'd set all eight values as needed (as some
> OSs do).  At the very least, please document specifically in the mount_nfs
> man page how one turns off the attribute cache completely.
> 
> Anyway, I was able to verify this in 5.4 and 6.0 (SNAP001).  And it looks
> like the NFSMNT_ACREGMIN type of flags have existed as far back as 4.x, so I
> suspect that as long as the implementation was correct, even old versions of
> BSD should work well now with Amd.
> 
> I'll release a quick new version of am-utils (6.1.2.1) with this fix,
> specifically because I have a few freebsd users who complained about this
> bug.
> 
> I would like to ask whomever is responsible for maintaining am-utils for
> FreeBSD to consider importing 6.1.2.1 into your ports tree.  Currently
> you're stuck at an ancient 6.0.10.  6.1.x fixes numerous bugs other than
> this latest one, plus it offers a host of new performance and security
> features.
> 
> Thanks,
> Erez.

Thanks for looking into this and adapting am-utils for it.  Would you 
mind submitting a report to the bug database so that we can track this?
http://www.freebsd.org/send-pr.html.  As for importing a newer am-utils,
it's been talked about, but I don't expect it to happen for 6.0.  Thanks!

Scott



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