Skip site navigation (1)Skip section navigation (2)
Date:      Sat, 05 Aug 2006 22:43:17 -0500
From:      Eric Anderson <anderson@centtech.com>
To:        Eric Anderson <anderson@centtech.com>
Cc:        freebsd-fs@freebsd.org
Subject:   Re: locking questions (regarding file systems) (SOLVED)
Message-ID:  <44D56555.5020107@centtech.com>
In-Reply-To: <44D3A7D1.1070406@centtech.com>
References:  <20060803200158.61098.qmail@web30315.mail.mud.yahoo.com> <44D3A7D1.1070406@centtech.com>

next in thread | previous in thread | raw e-mail | index | archive | help
On 08/04/06 15:02, Eric Anderson wrote:
> On 08/03/06 15:01, R. B. Riddick wrote:
>> --- Eric Anderson <anderson@centtech.com> wrote:
>>> I just did, and looks like the g_vfs_close directly after the g_vfs_open 
>>> block (I copy-pasted) works ok.  When unmounting, it then panics on 
>>> g_vfs_close, probably because it's already closed from before.
>>>
>> So the sequence:
>>   ...
>>   g_vfs_open(...);
>>   g_vfs_close(...);
>>   ...
>> works fine.
>>
>> What r u doing between the mount and the unmount calls?
>> Maybe something changes, so that ...close() deadlocks?
>>
>> Did u try to put debug printf's in the g_vfs_close() function? :-)
> 
> No, I've been trying to avoid that :)
> 
>> Or is there a program somewhere, that uses g_vfs_open/close?
>> Maybe u could learn/copy&paste from hpfs?
>>   http://fxr.watson.org/fxr/ident?i=g_vfs_close
> 
> I've looked at other fs's, and it's helpful, but it's a bug in my code 
> that is the problem. :)
> 
> I think I know the block of code the problem is in, now I just have to 
> hunt it down.  If I move the g_vfs_close around, I can get a panic like:
> 
> panic: lockmgr: locking against myself

Looks like I had to do this prior to the g_vfs_close:

vinvalbuf(devvp, V_SAVE, td, 0, 0);

That seemed to do the trick..

Thanks for all the help!

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?44D56555.5020107>