Date: Sun, 18 Sep 2005 22:25:38 -0400 From: Erez Zadok <ezk@cs.sunysb.edu> To: Scott Long <scottl@samsco.org>, Kris Kennaway <kris@obsecurity.org>, Erez Zadok <ezk@cs.sunysb.edu>, freebsd-fs@freebsd.org, christos@zoulas.com Subject: Re: turning off the NFS attribute cache Message-ID: <200509190225.j8J2PclG016625@agora.fsl.cs.sunysb.edu> In-Reply-To: Your message of "Sun, 18 Sep 2005 18:12:36 MDT." <432E0274.4010704@samsco.org>
next in thread | previous in thread | raw e-mail | index | archive | help
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.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200509190225.j8J2PclG016625>
