freebsd-skq/sys/cddl
Alexander Motin 537650f54d Add property and sysctl to control how ZVOLs are exposed to OS.
New ZFS property volmode and sysctl vfs.zfs.vol.mode allow switching ZVOL
between three modes:
 geom -- existing fully functional behavior (default);
 dev -- exposing volumes only as raw disk device file in devfs;
 none -- not exposing volumes outside ZFS.

The "dev" mode is less functional (can't be partitioned, mounted, etc),
but it is faster, and in some scenarios with untrusted consumers safer.
It can be useful for NAS, VM block storages, etc.
The "none" mode may be convenient for backup servers, etc. that don't
need direct data access.

Due to the way ZVOL is integrated with main ZFS code, those property
and sysctl are checked only during pool import and volume creation.

MFC after:	1 month
Sponsored by:	iXsystems, Inc.
2014-04-05 13:01:44 +00:00
..
boot/zfs MFV r259170: 2014-01-01 00:45:28 +00:00
compat/opensolaris Rename global cnt to vm_cnt to avoid shadowing. 2014-03-22 10:26:09 +00:00
contrib/opensolaris Add property and sysctl to control how ZVOLs are exposed to OS. 2014-04-05 13:01:44 +00:00
dev Expose a few DTrace parameters as sysctls under kern.dtrace and add 2014-03-01 19:06:43 +00:00