Date: Thu, 16 Jun 2005 10:50:04 -0400 From: Brian Fundakowski Feldman <green@FreeBSD.org> To: Jeff Roberson <jroberson@chesapeake.net> Cc: cvs-src@FreeBSD.org, Jeff Roberson <jeff@FreeBSD.org>, src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_subr.c Message-ID: <20050616145004.GJ66188@green.homeunix.org> In-Reply-To: <20050616004203.N66638@mail.chesapeake.net> References: <200506160441.j5G4fg0l078419@repoman.freebsd.org> <20050616004203.N66638@mail.chesapeake.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, Jun 16, 2005 at 12:46:59AM -0400, Jeff Roberson wrote: > On Thu, 16 Jun 2005, Jeff Roberson wrote: > > > jeff 2005-06-16 04:41:42 UTC > > This fixes duplicate frees from the vnode zone, crashes in vnlrureclaim > and vlru_free() and a few other related problems. Basically, I've > converted the holdcnt to be a proper ref counting system, while use count > maintains the traditional vfs use count semantics, which are not really > compatbile with structure life-time issues. It looks like a big change > but it really makes things much simpler. Briefly, the rules are this: > > 1) vget/grab a use count if you're a normal consumer of the vnode API. > That goes for syscalls, mmaping, nfs, etc. > > 2) vhold() if you want to prevent a vnode from being recycled while you > hold a reference to it. The name cache uses this, as does the vm when > pages reference the vnode's vm object. This is also used for vlrureclaim, > vflush, vtryrecyle, etc. which want to make sure the vnode is not recycled > while it has a local reference. > > I'll probably add a comment to vnode.h to describe this in more detail. So how many beers do we owe you now? :-) -- Brian Fundakowski Feldman \'[ FreeBSD ]''''''''''\ <> green@FreeBSD.org \ The Power to Serve! \ Opinions expressed are my own. \,,,,,,,,,,,,,,,,,,,,,,\
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20050616145004.GJ66188>