HomeFreeBSD

ZVOLs should not be allowed to have children

Description

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>

Details

Provenance
loli10K <loli10K@users.noreply.github.com>Authored on Feb 8 2019, 11:44 PM
mahrensCommitted on Feb 8 2019, 11:44 PM
Parents
R10:4417096956f7: Pool allocation classes misplacing small file blocks
Branches
Unknown
Tags
Unknown

Event Timeline