From owner-cvs-all@FreeBSD.ORG Thu Jun 16 14:50:06 2005 Return-Path: X-Original-To: cvs-all@FreeBSD.org Delivered-To: cvs-all@FreeBSD.org Received: from green.homeunix.org (freefall.freebsd.org [216.136.204.21]) by hub.freebsd.org (Postfix) with ESMTP id C8B5F16A41C; Thu, 16 Jun 2005 14:50:05 +0000 (GMT) (envelope-from green@green.homeunix.org) Received: from green.homeunix.org (green@localhost [127.0.0.1]) by green.homeunix.org (8.13.3/8.13.1) with ESMTP id j5GEo5GG003153; Thu, 16 Jun 2005 10:50:05 -0400 (EDT) (envelope-from green@green.homeunix.org) Received: (from green@localhost) by green.homeunix.org (8.13.3/8.13.1/Submit) id j5GEo4dS003152; Thu, 16 Jun 2005 10:50:04 -0400 (EDT) (envelope-from green) Date: Thu, 16 Jun 2005 10:50:04 -0400 From: Brian Fundakowski Feldman To: Jeff Roberson Message-ID: <20050616145004.GJ66188@green.homeunix.org> References: <200506160441.j5G4fg0l078419@repoman.freebsd.org> <20050616004203.N66638@mail.chesapeake.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20050616004203.N66638@mail.chesapeake.net> User-Agent: Mutt/1.5.6i Cc: cvs-src@FreeBSD.org, Jeff Roberson , src-committers@FreeBSD.org, cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_subr.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: CVS commit messages for the entire tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 16 Jun 2005 14:50:06 -0000 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. \,,,,,,,,,,,,,,,,,,,,,,\