Date: Fri, 11 Mar 2005 02:31:04 +0000 From: Ian Dowse <iedowse@maths.tcd.ie> To: Jeff Roberson <jroberson@chesapeake.net> Cc: pete@isilon.com Subject: Re: Cleaning up vgone. Message-ID: <200503110231.aa37257@salmon.maths.tcd.ie> In-Reply-To: Your message of "Thu, 10 Mar 2005 06:21:04 EST." <20050310061419.Y20708@mail.chesapeake.net>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?200503110231.aa37257>