]> git.proxmox.com Git - mirror_zfs.git/commit - tests/zfs-tests/include/libtest.shlib
Add port of FreeBSD 'volmode' property
authorLOLi <loli10K@users.noreply.github.com>
Wed, 12 Jul 2017 20:05:37 +0000 (22:05 +0200)
committerBrian Behlendorf <behlendorf1@llnl.gov>
Wed, 12 Jul 2017 20:05:37 +0000 (13:05 -0700)
commitcf8738d85374f51298a0872bcd58257bbb4fda6d
tree213e94c15f61f569836e7e0f0fb40727e8cdd4f9
parente19572e4cc0b8df95ebf60053029e454592a92d4
Add port of FreeBSD 'volmode' property

The volmode property may be set to control the visibility of ZVOL
block devices.

This allow switching ZVOL between three modes:
   full - existing fully functional behaviour (default)
   dev  - hide partitions on ZVOL block devices
   none - not exposing volumes outside ZFS

Additionally the new zvol_volmode module parameter can be used to
control the default behaviour.

This functionality can be used, for instance, on "backup" pools to
avoid cluttering /dev with unneeded zd* devices.

Original-patch-by: mav <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Ported-by: loli10K <ezomori.nozomu@gmail.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>
FreeBSD-commit: https://github.com/freebsd/freebsd/commit/dd28e6bb
Closes #1796
Closes #3438
Closes #6233
14 files changed:
include/sys/fs/zfs.h
include/sys/zvol.h
man/man5/zfs-module-parameters.5
man/man8/zfs.8
module/zcommon/zfs_prop.c
module/zfs/zfs_ioctl.c
module/zfs/zvol.c
tests/runfiles/linux.run
tests/zfs-tests/include/libtest.shlib
tests/zfs-tests/tests/functional/cli_root/zpool_create/zpool_create_011_neg.ksh
tests/zfs-tests/tests/functional/zvol/zvol_misc/Makefile.am
tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_common.kshlib [new file with mode: 0755]
tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_snapdev.ksh
tests/zfs-tests/tests/functional/zvol/zvol_misc/zvol_misc_volmode.ksh [new file with mode: 0755]