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/libzfs.h | |
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/libzfs.h')
-rw-r--r-- | include/libzfs.h | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/include/libzfs.h b/include/libzfs.h index 85b0bc0dd..72d956b41 100644 --- a/include/libzfs.h +++ b/include/libzfs.h @@ -142,6 +142,7 @@ typedef enum zfs_error { EZFS_TOOMANY, /* argument list too long */ EZFS_INITIALIZING, /* currently initializing */ EZFS_NO_INITIALIZE, /* no active initialize */ + EZFS_WRONG_PARENT, /* invalid parent dataset (e.g ZVOL) */ EZFS_UNKNOWN } zfs_error_t; |