From owner-freebsd-fs Mon Jul 29 03:06:45 1996 Return-Path: owner-fs Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id DAA17251 for fs-outgoing; Mon, 29 Jul 1996 03:06:45 -0700 (PDT) Received: from minnow.render.com (render.demon.co.uk [158.152.30.118]) by freefall.freebsd.org (8.7.5/8.7.3) with SMTP id DAA17245 for ; Mon, 29 Jul 1996 03:06:39 -0700 (PDT) Received: from localhost (dfr@localhost) by minnow.render.com (8.6.12/8.6.9) with SMTP id LAA08550; Mon, 29 Jul 1996 11:06:33 +0100 Date: Mon, 29 Jul 1996 11:06:32 +0100 (BST) From: Doug Rabson To: "Martin v.Loewis" cc: freebsd-fs@freebsd.org Subject: Re: VGET question In-Reply-To: <199607281056.MAA18474@cent.cs.tu-berlin.de> Message-ID: MIME-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII Sender: owner-fs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk On Sun, 28 Jul 1996, Martin v.Loewis wrote: > I wonder whether VOP_VGET should return the vnode locked. Most filesystems > check their hash lists, and if the vnode is there, they'll perform > vget(vp,1), thus locking the vnode. > If they need a new vnode, they get it from getnewvnode, which returns it > unlocked. In all cases I've checked, the vnode is then return unlocked to > the caller. > So what is the proper behaviour, here? I think that the current intention is that it should be returned locked. The vnode from getnewvnode is locked (for UFS) by calling ufs_ihashins(). I believe that it should take a flag argument to specify whether it should be returned locked or unlocked. This would be consistent with vget() and might make it possible to clean up the weird locking code in VOP_LOOKUP. -- Doug Rabson, Microsoft RenderMorphics Ltd. Mail: dfr@render.com Phone: +44 171 251 4411 FAX: +44 171 251 0939