From owner-freebsd-arch@FreeBSD.ORG Fri Mar 11 02:31:08 2005 Return-Path: Delivered-To: freebsd-arch@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 2A8E316A4CE for ; Fri, 11 Mar 2005 02:31:08 +0000 (GMT) Received: from salmon.maths.tcd.ie (salmon.maths.tcd.ie [134.226.81.11]) by mx1.FreeBSD.org (Postfix) with SMTP id 4A2D443D53 for ; Fri, 11 Mar 2005 02:31:07 +0000 (GMT) (envelope-from iedowse@maths.tcd.ie) Received: from walton.maths.tcd.ie by salmon.maths.tcd.ie with SMTP id ; 11 Mar 2005 02:31:06 +0000 (GMT) To: Jeff Roberson In-Reply-To: Your message of "Thu, 10 Mar 2005 06:21:04 EST." <20050310061419.Y20708@mail.chesapeake.net> Date: Fri, 11 Mar 2005 02:31:04 +0000 From: Ian Dowse Message-ID: <200503110231.aa37257@salmon.maths.tcd.ie> cc: arch@freebsd.org cc: pete@isilon.com Subject: Re: Cleaning up vgone. X-BeenThere: freebsd-arch@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Discussion related to FreeBSD architecture List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Mar 2005 02:31:08 -0000 In message <20050310061419.Y20708@mail.chesapeake.net>, Jeff Roberson writes: [Good info about shared lock filesystems and VI_DOOMED snipped] >I'd much rather get rid of DOINGINACT and simply vhold the vnode so it >doesn't have a 0 ref count. It seems more natural to me to use a >reference than special case another flag. I like the idea of the patch >below, but it conflicts with the patch I just posted as I removed the >DOINGINACT check from VSHOULDFREE. Yes, I'm all for a cleaner way of doing this too. Many of the reasons for DOINGINACT will become unnecessary with your changes anyway, such as the code in nfs_inactive() that used to have to worry about the vnode going away while it did the sillyrename I/O. The only advantage I can think of for using a special flag instead of holding a reference in vgone() is the following: if code called by vgone() has a bug and drops one too many references, then the negative reference count will be caught sooner. It's worth at least making sure that we get a clean panic in this case since recursion caused by the reference count hitting zero twice can lead to messy panics that are difficult to debug. Ian