diff options
author | loli10K <[email protected]> | 2019-02-09 00:44:15 +0100 |
---|---|---|
committer | Matthew Ahrens <[email protected]> | 2019-02-08 15:44:15 -0800 |
commit | d8d418ff0cc90776182534bce10b01e9487b63e4 (patch) | |
tree | b7db149cf6bfc701f7b3637359c192b2575c83c8 /include/sys/fs | |
parent | 4417096956f7439322c65d9e70a4526df45ea8d0 (diff) |
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 <[email protected]>
Reviewed-by: Matt Ahrens <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Tom Caputi <[email protected]>
Signed-off-by: loli10K <[email protected]>
Diffstat (limited to 'include/sys/fs')
-rw-r--r-- | include/sys/fs/zfs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index 945853739..395d2e27f 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -1256,6 +1256,7 @@ typedef enum { ZFS_ERR_IOC_ARG_UNAVAIL, ZFS_ERR_IOC_ARG_REQUIRED, ZFS_ERR_IOC_ARG_BADTYPE, + ZFS_ERR_WRONG_PARENT, } zfs_errno_t; /* |