freebsd-skq/sys
asomers 5127f80e63 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
2016-01-19 17:00:25 +00:00
..
amd64 Use ANSI definitions. Wrap long line. 2016-01-19 08:08:08 +00:00
arm Add extra checks to make sure the size is valid. We may get an integer 2016-01-18 00:07:04 +00:00
arm64 Enable AIO interface on ARM64 platforms 2016-01-18 14:11:34 +00:00
boot Reset the filesystem cache before reading from a potentially new 2016-01-18 20:22:51 +00:00
bsm Merge from contrib/openbsm to bring the kernel audit bits up to date with OpenBSM 1.2 alpha 4: 2015-12-20 23:22:04 +00:00
cam Convert sys/cam to use make_dev_s(). 2016-01-07 20:22:55 +00:00
cddl Disallow zvol-backed ZFS pools 2016-01-19 17:00:25 +00:00
compat Prevent double free of control in common sendmsg path as sosend 2016-01-17 19:28:13 +00:00
conf Move ohci files to their proper place in the tree for atmel. 2016-01-16 04:47:32 +00:00
contrib Fix order of last two arguments of mtx_init 2016-01-14 20:25:22 +00:00
crypto Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
ddb Add helper to catch single step debug event and distinguish it from bkpt 2015-11-27 19:03:59 +00:00
dev Add optimizing LRO wrapper: 2016-01-19 15:33:28 +00:00
fs Assert that the linkage between struct cdev_privdata and and struct 2016-01-17 08:34:35 +00:00
gdb
geom Add rotationrate to geom disk dumpconf 2016-01-14 21:52:21 +00:00
gnu Fixing a memory leak on module unloading. 2015-09-11 22:43:35 +00:00
i386 Adjust i386 comment to match amd64 one after r294311. 2016-01-19 08:09:09 +00:00
isa
kern Add vrefl(), a locked variant of vref(9). 2016-01-18 22:21:46 +00:00
kgssapi Unset the gss kernel state when gssd exits 2016-01-01 17:06:16 +00:00
libkern libkern: ffs, fls: s/4/3/ the 3rd BSD clause 2015-10-22 21:04:47 +00:00
mips Implement vsyscall hack. Prior to 2.13 glibc uses vsyscall 2016-01-09 20:18:53 +00:00
modules sfxge: add accessors for license-related MCDI calls to common code 2016-01-14 09:19:28 +00:00
net Clean up original route path selection logic a bit. 2016-01-15 13:47:11 +00:00
net80211 Remove sys/eventhandler.h from net/route.h 2016-01-09 09:34:39 +00:00
netgraph Make ng_netflow(9) use new routing KPI. 2016-01-14 13:14:12 +00:00
netinet Add optimizing LRO wrapper: 2016-01-19 15:33:28 +00:00
netinet6 Verify the packet length in sctp6_input(). 2016-01-14 10:11:10 +00:00
netipsec Overhaul if_enc(4) and make it loadable in run-time. 2015-11-25 07:31:59 +00:00
netnatm
netpfil Initialize error value ta_lookup_kfib() by default to please compiler. 2016-01-10 08:37:00 +00:00
netsmb The problem report was for a crash that happened when smbfs was 2015-11-18 23:04:01 +00:00
nfs Add kernel support to the NFS server for the "-manage-gids" 2015-11-30 21:54:27 +00:00
nfsclient
nfsserver
nlm
ofed Finish r275196: do not dereference rtentry in if_output() routines. 2016-01-09 16:34:37 +00:00
opencrypto Break up opencrypto/xform.c so it can be reused piecemeal 2015-12-30 22:43:07 +00:00
pc98 Add asynchronous command support to the pass(4) driver, and the new 2015-12-03 20:54:55 +00:00
powerpc Hide most of the PTE initialization and management. 2016-01-19 03:07:25 +00:00
riscv/include Correct RISC-V exception types. 2016-01-18 17:49:32 +00:00
rpc Improve locking of sg_threadcount. 2015-11-19 08:04:05 +00:00
security Busy the mount point which is the owner of the audit vnode, around 2016-01-16 10:06:33 +00:00
sparc64 Implement vsyscall hack. Prior to 2.13 glibc uses vsyscall 2016-01-09 20:18:53 +00:00
sys Add optimizing LRO wrapper: 2016-01-19 15:33:28 +00:00
teken Sync HPA and VPA implementations with CUP. 2015-08-24 07:49:27 +00:00
tests Style 9 changes. 2015-11-12 10:31:14 +00:00
tools Rename the /usr/share/doc/legal files to driver.LICENSE to work around 2015-10-16 00:38:05 +00:00
ufs Recheck curthread->td_su after the VFS_SYNC() call, and re-sync if the 2015-12-21 11:50:32 +00:00
vm A fix to r292469: Iterate over the physical segments in descending rather 2016-01-16 04:41:40 +00:00
x86 hyperv: use x86 generic code to do the hypervisor detection 2016-01-14 02:50:13 +00:00
xdr
xen xenbus: add a comment with the names of the generated accessors 2016-01-15 14:34:31 +00:00
Makefile