freebsd-skq/sys/cddl/contrib/opensolaris/uts
freqlabs 5ea1792848 MFOpenZFS: ZVOLs should not be allowed to have children
zfs create, receive and rename can bypass this hierarchy rule. Update
both userland and kernel module to prevent this issue and use pyzfs
unit tests to exercise the ioctls directly.

Note: this commit slightly changes zfs_ioc_create() ABI. This allow to
differentiate a generic error (EINVAL) from the specific case where we
tried to create a dataset below a ZVOL (ZFS_ERR_WRONG_PARENT).

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Matt Ahrens <mahrens@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Tom Caputi <tcaputi@datto.com>
Signed-off-by: loli10K <ezomori.nozomu@gmail.com>

Approved by:	mav (mentor)
MFC after:	2 weeks
Sponsored by:	iXsystems, Inc.
openzfs/zfs@d8d418ff0c
2020-03-25 15:56:18 +00:00
..
aarch64 Revert r344587. 2019-02-26 17:33:56 +00:00
arm Revert r344587. 2019-02-26 17:33:56 +00:00
common MFOpenZFS: ZVOLs should not be allowed to have children 2020-03-25 15:56:18 +00:00
intel amd64: move GDT into PCPU area. 2019-11-12 15:51:47 +00:00
mips Revert r344587. 2019-02-26 17:33:56 +00:00
powerpc Correct initialization of pc on powerpc. 2017-12-12 20:41:11 +00:00
riscv Revert r344587. 2019-02-26 17:33:56 +00:00