From owner-cvs-all@FreeBSD.ORG Sat Apr 9 12:25:08 2005 Return-Path: Delivered-To: cvs-all@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 45ADD16A4CE; Sat, 9 Apr 2005 12:25:08 +0000 (GMT) Received: from mail.chesapeake.net (chesapeake.net [208.142.252.6]) by mx1.FreeBSD.org (Postfix) with ESMTP id 942C143D46; Sat, 9 Apr 2005 12:25:07 +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 j39CP6ws054713; Sat, 9 Apr 2005 08:25:06 -0400 (EDT) (envelope-from jroberson@chesapeake.net) Received: from localhost (jroberson@localhost)j39CP6ZT054705; Sat, 9 Apr 2005 08:25:06 -0400 (EDT) (envelope-from jroberson@chesapeake.net) X-Authentication-Warning: mail.chesapeake.net: jroberson owned process doing -bs Date: Sat, 9 Apr 2005 08:25:06 -0400 (EDT) From: Jeff Roberson To: Jeff Roberson In-Reply-To: <200504091153.j39BrGm2033374@repoman.freebsd.org> Message-ID: <20050409082310.J28571@mail.chesapeake.net> References: <200504091153.j39BrGm2033374@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_lookup.c X-BeenThere: cvs-all@freebsd.org X-Mailman-Version: 2.1.1 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: Sat, 09 Apr 2005 12:25:08 -0000 On Sat, 9 Apr 2005, Jeff Roberson wrote: > jeff 2005-04-09 11:53:16 UTC > > FreeBSD src repository > > Modified files: > sys/kern vfs_lookup.c With this change I'm able to make -j128 buildworld on a nullfs mount of /usr/src at the same time as doing the same on the real /usr/src. The intrduction of a vn_lock in vrele() more than 5 years ago broke this by creating a lock order reversal in every place that vrele'd the dvp before droping a child's lock. > Log: > - If we vrele() a dvp while the child is locked we can potentially deadlock > when vrele() acquires the directory lock in the wrong order. Fix this > via the following changes: > - Keep the directory locked after VOP_LOOKUP() until we've determined > what we're going to do with the child. This allows us to remove the > complicated post LOOKUP code which determins whether we should lock or > unlock the parent. This means we may have to vput() in the appropriate > cases later, rather than doing an unsafe vrele. > - in NDFREE() keep two flags to indicate whether we need to unlock vp or > dvp. This allows us to vput rather than vrele in the appropriate > cases without rechecking the flags. Move the code to handle dvp after > we handle vp. > - Remove some dead code from namei() that was the result of changes to > VFS_LOCK_GIANT(). > > Sponsored by: Isilon Systems, Inc. > > Revision Changes Path > 1.78 +60 -51 src/sys/kern/vfs_lookup.c >