From owner-svn-src-all@freebsd.org Tue Jan 19 17:08:57 2016 Return-Path: Delivered-To: svn-src-all@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 B3903A89EA6; Tue, 19 Jan 2016 17:08:57 +0000 (UTC) (envelope-from lidl@pix.net) Received: from hydra.pix.net (hydra.pix.net [IPv6:2001:470:e254:10::4]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mail.pix.net", Issuer "Pix.Com Technologies, LLC CA" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 6817C1F51; Tue, 19 Jan 2016 17:08:57 +0000 (UTC) (envelope-from lidl@pix.net) Received: from torb.pix.net ([IPv6:2001:470:e254:11:52:fed0:33f2:51b0]) (authenticated bits=0) by hydra.pix.net (8.15.2/8.15.2) with ESMTPA id u0JH8mW3062529; Tue, 19 Jan 2016 12:08:55 -0500 (EST) (envelope-from lidl@pix.net) X-Authentication-Warning: hydra.pix.net: Host [IPv6:2001:470:e254:11:52:fed0:33f2:51b0] claimed to be torb.pix.net Subject: Re: svn commit: r294329 - in head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs: . sys To: Alan Somers , src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org References: <201601191700.u0JH0P6k061610@repo.freebsd.org> From: Kurt Lidl Message-ID: <569E6DA0.9010300@pix.net> Date: Tue, 19 Jan 2016 12:08:48 -0500 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: <201601191700.u0JH0P6k061610@repo.freebsd.org> Content-Type: text/plain; charset=utf-8; format=flowed Content-Transfer-Encoding: 7bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Jan 2016 17:08:57 -0000 Removing the ability to run different zpools on top of a zvol is a significant reduction in functionality of the entire system, and a huge violation of the POLA. At the very least, can you not add a sysctl that allows the dangerous behavior (even if it defaults to off)? Myself and certainly others rely on having being able to use a zpool installed into a zvol for hosting bhyve virtual machines. I've managed to deadlock the system when experimenting with this, but for the normal course of operations, it works just fine. -Kurt On 1/19/16 12:00 PM, 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 > > Modified: > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/sys/vdev_impl.h > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/vdev_geom.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c > head/sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zvol.c [diff truncated]