Date: Thu, 3 Aug 2006 00:03:16 +0400 From: Stanislav Sedov <ssedov@mbsd.msk.ru> To: freebsd-fs@freebsd.org Subject: Re: locking questions (regarding file systems) Message-ID: <20060803000316.6b371691@localhost> In-Reply-To: <44D0F6E3.7080908@centtech.com>
index | next in thread | previous in thread | raw e-mail
[-- Attachment #1 --] On Wed, 02 Aug 2006 14:02:59 -0500 Eric Anderson <anderson@centtech.com> mentioned: > 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 > > > It seems that device or geom isn't unlocked. Do you call VOP_UNLOCK(devvp) after g_vfs_open()? You can enable geom locks debugging by manipulation sys.kern.geom.debug values. -- Stanislav Sedov MBSD labs, Inc. <ssedov@mbsd.msk.ru> Россия, Москва http://mbsd.msk.ru -------------------------------------------------------------------- If the facts don't fit the theory, change the facts. -- A. Einstein -------------------------------------------------------------------- PGP fingerprint: F21E D6CC 5626 9609 6CE2 A385 2BF5 5993 EB26 9581 [-- Attachment #2 --] -----BEGIN PGP SIGNATURE----- Version: GnuPG v1.4.3 (FreeBSD) iD8DBQFE0QUEK/VZk+smlYERAv6kAJ4vzUb05NFGyTlEEs7JtHh6EnlYjgCfbEfE P/zcNuQqiufsSAnqNcTmGHI= =ks8l -----END PGP SIGNATURE-----home | help
Want to link to this message? Use this
URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20060803000316.6b371691>
