Date: Sun, 5 Oct 2003 16:20:45 -0400 (EDT) From: Jeff Roberson <jroberson@chesapeake.net> To: Don Lewis <truckman@FreeBSD.org> Cc: cvs-all@FreeBSD.org Subject: Re: cvs commit: src/sys/kern vfs_subr.c Message-ID: <20031005161928.E99666-100000@mail.chesapeake.net> In-Reply-To: <200310052017.h95KHEN1049884@gw.catspoiler.org>
next in thread | previous in thread | raw e-mail | index | archive | help
On Sun, 5 Oct 2003, Don Lewis wrote: > On 5 Oct, Jeff Roberson wrote: > > > In vflush we do sleep on the vnode lock. The flags are LK_EXCLUSIVE | > > LK_INTERLOCK. We dont pass in LK_NOWAIT. > > Ohhh ... > > I always thought we wouldn't sleep unless we specified LK_RETRY. The > fine man page isn't terribly helpful about when to use some of the > flags. > > If we hold a reference to an active vnode, can it ever be type VT_NON? > And if it is of type VT_NON, could it ever morph into some other type > while we hold the reference? If not, why would we want to specify the > LK_RETRY flag for such a vnode? Does this mean that way too many users > of vn_lock() are specifying the LK_RETRY flag? > I think so, I've actually just mailed kirk about this. If someone does a forceclose while you hold a reference it will be cleaned and removed. Holding either the vi lock or the vnode lock prevents this, however. Cheers, Jeff
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20031005161928.E99666-100000>