From owner-freebsd-fs@FreeBSD.ORG Mon Sep 19 03:06:18 2005 Return-Path: X-Original-To: freebsd-fs@freebsd.org Delivered-To: freebsd-fs@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id F0C5316A41F for ; Mon, 19 Sep 2005 03:06:17 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from pooker.samsco.org (pooker.samsco.org [168.103.85.57]) by mx1.FreeBSD.org (Postfix) with ESMTP id 2D6F143D48 for ; Mon, 19 Sep 2005 03:06:14 +0000 (GMT) (envelope-from scottl@samsco.org) Received: from [192.168.254.11] (junior.samsco.home [192.168.254.11]) (authenticated bits=0) by pooker.samsco.org (8.13.4/8.13.4) with ESMTP id j8J3646K022369; Sun, 18 Sep 2005 21:06:04 -0600 (MDT) (envelope-from scottl@samsco.org) Message-ID: <432E2B24.5040607@samsco.org> Date: Sun, 18 Sep 2005 21:06:12 -0600 From: Scott Long User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050615 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Erez Zadok References: <200509190225.j8J2PclG016625@agora.fsl.cs.sunysb.edu> In-Reply-To: <200509190225.j8J2PclG016625@agora.fsl.cs.sunysb.edu> Content-Type: text/plain; charset=us-ascii; format=flowed Content-Transfer-Encoding: 7bit X-Spam-Status: No, score=-2.8 required=3.8 tests=ALL_TRUSTED autolearn=failed version=3.0.2 X-Spam-Checker-Version: SpamAssassin 3.0.2 (2004-11-16) on pooker.samsco.org Cc: freebsd-fs@freebsd.org, christos@zoulas.com, Kris Kennaway Subject: Re: turning off the NFS attribute cache X-BeenThere: freebsd-fs@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Filesystems List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 19 Sep 2005 03:06:18 -0000 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