svn commit: r294329 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys

Allan Jude allanjude at freebsd.org
Sun Jan 24 17:27:27 UTC 2016


On 2016-01-24 09:13, 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.
> 
> Thanks,
> 

Alan is working on making it a sysctl, so you can turn the old behaviour
back on. You might want to test that patch:
https://reviews.freebsd.org/D4998

-- 
Allan Jude

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 834 bytes
Desc: OpenPGP digital signature
URL: <http://lists.freebsd.org/pipermail/svn-src-all/attachments/20160124/5836818b/attachment.sig>


More information about the svn-src-all mailing list