svn commit: r224920 -
projects/zfsd/head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs
Pawel Jakub Dawidek
pjd at FreeBSD.org
Wed Aug 17 09:29:43 UTC 2011
On Tue, Aug 16, 2011 at 10:20:45PM +0000, Justin T. Gibbs wrote:
> Author: gibbs
> Date: Tue Aug 16 22:20:45 2011
> New Revision: 224920
> URL: http://svn.freebsd.org/changeset/base/224920
>
> Log:
> Close several race conditions in the ZFS vdev geom module, most triggered
> by concurrent ZFS reprobe and GEOM orphan processing.
>
> sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c:
> o Make vdev_geom_close() synchronous instead of deferring
> its work to a GEOM event handler. This prevents a future
> open call from referencing a consumer that is scheduled for
> destruction.
[...]
> @@ -547,9 +558,9 @@ vdev_geom_close(vdev_t *vd)
> cp = vd->vdev_tsd;
> if (cp == NULL)
> return;
> - vd->vdev_tsd = NULL;
> - vd->vdev_delayed_close = B_FALSE;
> - g_post_event(vdev_geom_detach, cp, M_WAITOK, NULL);
> + g_topology_lock();
> + vdev_geom_detach(cp);
> + g_topology_unlock();
This reverts the @104422 change I made. The reason for deatching vdev
from the GEOM event thread was that I was experiencing deadlocks when
trying to acquire the topology lock in vdev_geom_close().
It was long time ago, so the deadlock might not be there anymore as
there were a lot of changes to the locking in the meantime (it might
have been due to LOR between the topology lock and the
spa_namespace_lock/spa_config, which is no longer a problem).
Just FYI.
--
Pawel Jakub Dawidek http://www.wheelsystems.com
FreeBSD committer http://www.FreeBSD.org
Am I Evil? Yes, I Am! http://yomoli.com
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 196 bytes
Desc: not available
Url : http://lists.freebsd.org/pipermail/svn-src-projects/attachments/20110817/be15c292/attachment.pgp
More information about the svn-src-projects
mailing list