From owner-cvs-src@FreeBSD.ORG Sun Mar 13 15:12:56 2005 Return-Path: Delivered-To: cvs-src@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id DB66F16A4CE; Sun, 13 Mar 2005 15:12:56 +0000 (GMT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id CB4DA43D46; Sun, 13 Mar 2005 15:12:55 +0000 (GMT) (envelope-from jroberson@chesapeake.net) Received: from mail.chesapeake.net (localhost [127.0.0.1]) by mail.chesapeake.net (8.12.10/8.12.10) with ESMTP id j2DFCsd4003419; Sun, 13 Mar 2005 10:12:54 -0500 (EST) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost)j2DFCsPI003413; Sun, 13 Mar 2005 10:12:54 -0500 (EST) (envelope-from jroberson@chesapeake.net) X-Authentication-Warning: mail.chesapeake.net: jroberson owned process doing -bs Date: Sun, 13 Mar 2005 10:12:54 -0500 (EST) From: Jeff Roberson To: Jeff Roberson In-Reply-To: <200503131154.j2DBsSrq041257@repoman.freebsd.org> Message-ID: <20050313101148.G20708@mail.chesapeake.net> References: <200503131154.j2DBsSrq041257@repoman.freebsd.org> MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII cc: cvs-src@FreeBSD.org cc: src-committers@FreeBSD.org cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_subr.c X-BeenThere: cvs-src@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: CVS commit messages for the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 13 Mar 2005 15:12:57 -0000 On Sun, 13 Mar 2005, Jeff Roberson wrote: > jeff 2005-03-13 11:54:28 UTC > > FreeBSD src repository > > Modified files: > sys/kern vfs_subr.c There is a minor problem with my vget() changes that could lead to a vnode leak in a very rare scenario. Basically, I forgot to drop a ref if I fail with ENOENT in one or two cases, but this only happens if you try to lock a vnode while it's being recycled. I'll fix it tomorrow afternoon. Until then, it's really nothing to worry about. > Log: > - Remove vx_lock, vx_unlock, vx_wait, etc. > - Add a vn_start_write/vn_finished_write around vlrureclaim so we don't do > writing ops without suspending. This could suspend the vlruproc which > should not be a problem under normal circumstances. > - Manually implement VMIGHTFREE in vlrureclaim as this was the only instance > where it was used. > - Acquire a lock before calling vgone() as it now requires it. > - Move the acquisition of the vnode interlock from vtryrecycle() to > getnewvnode() so that if it fails we don't drop and reacquire the > vnode_free_list_mtx. > - Check for a usecount or holdcount at the end of vtryrecycle() in case > someone grabbed a ref while we were recycling. Abort the recycle, and > on the final ref drop this vnode will be placed on the head of the free > list. > - Move the redundant VOP_INACTIVE protection code into the local > vinactive() routine to avoid code bloat. > - Keep the vnode lock held across calls to vgone() in several places. > - vgonel() no longer uses XLOCK, instead callers must hold an exclusive > vnode lock. The VI_DOOMED flag is set to allow other threads to detect > a vnode which is no longer valid. This flag is set until the last > reference is gone, and there are no chances for a new ref. vgonel() > holds this lock across the entire function, which greatly simplifies > logic. > _ Only vfree() in one place in vgone() not three. > - Adjust vget() to check the VI_DOOMED flag prior to waiting on the lock > in the LK_NOWAIT case. In other cases, check after we have slept and > acquired an exlusive lock. This will simulate the old vx_wait() > behavior. > > Sponsored by: Isilon Systems, Inc. > > Revision Changes Path > 1.590 +129 -225 src/sys/kern/vfs_subr.c >