]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
MFC r359303
authorRyan Moeller <freqlabs@FreeBSD.org>
Wed, 8 Apr 2020 06:06:13 +0000 (06:06 +0000)
committerRyan Moeller <freqlabs@FreeBSD.org>
Wed, 8 Apr 2020 06:06:13 +0000 (06:06 +0000)
commitaaca66d865528ac532557ffd4aeae9417da4ee0d
treef60ebed0971aa0577cf6f8a37caa31f5715d430f
parent5fd80d51893d0efa2bff2c15190834fa91c2d3e7
MFC r359303

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)
openzfs/zfs@d8d418ff0cc90776182534bce10b01e9487b63e4
cddl/contrib/opensolaris/lib/libzfs/common/libzfs.h
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_dataset.c
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_sendrecv.c
cddl/contrib/opensolaris/lib/libzfs/common/libzfs_util.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_objset.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dmu_send.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/dsl_dir.c
sys/cddl/contrib/opensolaris/uts/common/fs/zfs/zfs_ioctl.c
sys/cddl/contrib/opensolaris/uts/common/sys/fs/zfs.h