Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 02 Aug 2006 14:02:59 -0500
From:      Eric Anderson <anderson@centtech.com>
To:        freebsd-fs@freebsd.org
Subject:   locking questions (regarding file systems)
Message-ID:  <44D0F6E3.7080908@centtech.com>

next in thread | raw e-mail | index | archive | help
Hello everyone,
(resend from a post to the -geom list, which I received no replies)

I'm writing a file system (read-only), and I need to do some GEOM
related locking.  I can mount/unmount the filesystem on a vnode backed
md disk, but I can't re-mount on that device nor can I get rid (mdconfig
-d) of it.  It appears to be wedged in some kind of locking.

Here's basically what I do:
in the mount function for the FS, I do something like this:

DROP_GIANT();
g_topology_lock();
error = g_vfs_open(devvp, &cp, "fsname", 0);
g_topology_unlock();
PICKUP_GIANT();


What is needed in my unmount function to release those locks?  I've
tried some combinations of things, like:


DROP_GIANT();
g_topology_lock();
# wedges here
g_vfs_close(cp, td);
g_topology_unlock();
PICKUP_GIANT();
vrele(devvp);

How can I debug this and find out what is blocking it?

Any help would be greatly appreciated!

Eric



-- 
------------------------------------------------------------------------
Eric Anderson        Sr. Systems Administrator        Centaur Technology
Anything that works is better than anything that doesn't.
------------------------------------------------------------------------
_______________________________________________
freebsd-geom@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-geom
To unsubscribe, send any mail to "freebsd-geom-unsubscribe@freebsd.org"

-- 
------------------------------------------------------------------------
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?44D0F6E3.7080908>