Date: Mon, 29 Jul 1996 11:06:32 +0100 (BST) From: Doug Rabson <dfr@render.com> To: "Martin v.Loewis" <loewis@cs.tu-berlin.de> Cc: freebsd-fs@freebsd.org Subject: Re: VGET question Message-ID: <Pine.BSI.3.95.960729105835.8355A-100000@minnow.render.com> In-Reply-To: <199607281056.MAA18474@cent.cs.tu-berlin.de>
next in thread | previous in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.BSI.3.95.960729105835.8355A-100000>