Date: Thu, 5 Jan 2012 09:50:47 +0000 (UTC) From: Martin Matuska <mm@FreeBSD.org> To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org Subject: svn commit: r229567 - stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs Message-ID: <201201050950.q059olU0025008@svn.freebsd.org>
next in thread | raw e-mail | index | archive | help
Author: mm Date: Thu Jan 5 09:50:47 2012 New Revision: 229567 URL: http://svn.freebsd.org/changeset/base/229567 Log: MFC r227110, r227111: MFC r227110 (pjd) [1]: In zvol_open() if the spa_namespace_lock is already held, it means that ZFS is trying to open and taste ZVOL as its VDEV. This is not supported, so return an error instead of panicing on spa_namespace_lock recursion. MFC r227111 (pjd) [2]: Correct typo in comment. PR: kern/162008 Reported by: Robert Millan <rmh@debian.org> [1] Fabian Keil <fk@fabiankeil.de> [2] Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Directory Properties: stable/8/sys/ (props changed) stable/8/sys/cddl/contrib/opensolaris/ (props changed) Modified: stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c ============================================================================== --- stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Thu Jan 5 09:39:29 2012 (r229566) +++ stable/8/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c Thu Jan 5 09:50:47 2012 (r229567) @@ -875,6 +875,14 @@ zvol_open(struct g_provider *pp, int fla zvol_state_t *zv; int err = 0; + if (MUTEX_HELD(&spa_namespace_lock)) { + /* + * If the spa_namespace_lock is being held, it means that ZFS + * is trying to open ZVOL as its VDEV. This is not supported. + */ + return (EOPNOTSUPP); + } + mutex_enter(&spa_namespace_lock); zv = pp->private;
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201201050950.q059olU0025008>