From owner-svn-src-head@freebsd.org Sun Jan 24 14:20:17 2016 Return-Path: Delivered-To: svn-src-head@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 654289C2FBB; Sun, 24 Jan 2016 14:20:17 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from vps1.elischer.org (vps1.elischer.org [204.109.63.16]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "vps1.elischer.org", Issuer "CA Cert Signing Authority" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 2712F859; Sun, 24 Jan 2016 14:20:16 +0000 (UTC) (envelope-from julian@freebsd.org) Received: from Julian-MBP3.local (50-196-156-133-static.hfc.comcastbusiness.net [50.196.156.133]) (authenticated bits=0) by vps1.elischer.org (8.15.2/8.15.2) with ESMTPSA id u0OEJmLP085450 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Sun, 24 Jan 2016 06:19:53 -0800 (PST) (envelope-from julian@freebsd.org) Subject: Re: svn commit: r294329 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys To: Shawn Webb , Alan Somers References: <201601191700.u0JH0P6k061610@repo.freebsd.org> <20160124141333.GA19117@mutt-hardenedbsd> Cc: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org, Xin LI From: Julian Elischer Message-ID: <56A4DD7E.7040303@freebsd.org> Date: Sun, 24 Jan 2016 22:19:42 +0800 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.11; rv:38.0) Gecko/20100101 Thunderbird/38.5.1 MIME-Version: 1.0 In-Reply-To: <20160124141333.GA19117@mutt-hardenedbsd> Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-head@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: SVN commit messages for the src tree for head/-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 24 Jan 2016 14:20:17 -0000 On 24/01/2016 10:13 PM, Shawn Webb wrote: > On Tue, Jan 19, 2016 at 05:00:25PM +0000, Alan Somers wrote: >> Author: asomers >> Date: Tue Jan 19 17:00:25 2016 >> New Revision: 294329 >> URL: https://svnweb.freebsd.org/changeset/base/294329 >> >> Log: >> Disallow zvol-backed ZFS pools >> >> Using zvols as backing devices for ZFS pools is fraught with panics and >> deadlocks. For example, attempting to online a missing device in the >> presence of a zvol can cause a panic when vdev_geom tastes the zvol. Better >> to completely disable vdev_geom from ever opening a zvol. The solution >> relies on setting a thread-local variable during vdev_geom_open, and >> returning EOPNOTSUPP during zvol_open if that thread-local variable is set. >> >> Remove the check for MUTEX_HELD(&zfsdev_state_lock) in zvol_open. Its intent >> was to prevent a recursive mutex acquisition panic. However, the new check >> for the thread-local variable also fixes that problem. >> >> Also, fix a panic in vdev_geom_taste_orphan. For an unknown reason, this >> function was set to panic. But it can occur that a device disappears during >> tasting, and it causes no problems to ignore this departure. >> >> Reviewed by: delphij >> MFC after: 1 week >> Relnotes: yes >> Sponsored by: Spectra Logic Corp >> Differential Revision: https://reviews.freebsd.org/D4986 > I've just been bit by this pretty hard. I have a bhyve VM that's backed > by a zvol. The VM is running root-on-zfs. I wrote some experimental code > that's now preventing the VM from booting (kernel panic due to userland > change). Since I can't import the pool, I have no way of fixing the > problem. > > I'm probably just going to go revert this commit locally on my box so I > can get some work done. I use an md device to do this in bhyve but I was considering using a zvol. Populating it in the host system and then presenting it to the VM as a disk. maybe it could be enabled with a sysctl? Is the problem always present? > > Thanks, >