Date: Thu, 03 Aug 2006 13:12:58 -0500 From: Eric Anderson <anderson@centtech.com> To: "R. B. Riddick" <arne_woerner@yahoo.com> Cc: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) Message-ID: <44D23CAA.10907@centtech.com> In-Reply-To: <20060803061429.33043.qmail@web30307.mail.mud.yahoo.com> References: <20060803061429.33043.qmail@web30307.mail.mud.yahoo.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08/03/06 01:14, R. B. Riddick wrote: > --- Eric Anderson <anderson@centtech.com> wrote: >> # here use_count is 1 >> error = vflush(mp, 1, flags, td); >> if (error) >> return (error); >> >> DROP_GIANT(); >> g_topology_lock(); >> # this is where the use_count is now zero, and it blocks >> g_vfs_close(cp, td); >> g_topology_unlock(); >> PICKUP_GIANT(); >> vrele(devvp); >> >> Is it blocking because the use_count is already 0? Is the vflush >> breaking things? >> >>From the man page of vflush() I would guess, that u call it too early or > unnecessarily... > > My feeling says: Open & Close it... ;-) > > Or did u read a tutorial, that said u should do vflush() and vrele()? > I personally find that both calls should be done in the close() function... Hahahah! A tutorial! :) I'd *love* to read a tutorial on this, but I can't find one! >> Actually, I misinformed you earlier - I can't actually unmount, because >> it hangs during the first unmount. It will only unmount successfully if >> I remove the block above (the DROP_GIANT down to PICKUP_GIANT). >> > Hmm... Did u try to run without vflush() and vrele()? :-) I've tried getting rid of the vrele and vflush, and that doesn't help. Any other ideas? I have to be missing something very simple here.. Eric -- ------------------------------------------------------------------------ Eric Anderson Sr. Systems Administrator Centaur Technology Anything that works is better than anything that doesn't. ------------------------------------------------------------------------
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?44D23CAA.10907>