locking questions (regarding file systems)

Eric Anderson anderson at centtech.com
Fri Aug 4 20:02:09 UTC 2006


On 08/03/06 15:01, R. B. Riddick wrote:
> --- Eric Anderson <anderson at 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


Eric



-- 
------------------------------------------------------------------------
Eric Anderson        Sr. Systems Administrator        Centaur Technology
Anything that works is better than anything that doesn't.
------------------------------------------------------------------------


More information about the freebsd-fs mailing list