diff options
author | Matthew Macy <[email protected]> | 2019-12-05 13:06:51 -0800 |
---|---|---|
committer | Brian Behlendorf <[email protected]> | 2019-12-05 13:06:51 -0800 |
commit | 054a049841879bfa4d7a8c91fbe5c7d51864e23d (patch) | |
tree | c7f63cdf70d90e07e40272b06705ed64f4a31712 /include/sys | |
parent | e64e84eca57966cff1314d61f5b9557876e856e3 (diff) |
Add ZFS_IOC offsets for FreeBSD
FreeBSD requires three additional ioctls, they are ZFS_IOC_NEXTBOOT,
ZFS_IOC_JAIL, and ZFS_IOC_UNJAIL. These have been added after the
Linux-specific ioctls. The range 0x80-0xFF has been reserved for
future optional platform-specific ioctls. Any platform may choose
to implement these as appropriate.
None of the existing ioctl numbers have been changed to maintain
compatibility. For Linux no vectors have been registered for the
new ioctls and they are reported as unsupported.
Reviewed-by: Jorgen Lundman <[email protected]>
Reviewed-by: Allan Jude <[email protected]>
Reviewed-by: Brian Behlendorf <[email protected]>
Signed-off-by: Matt Macy <[email protected]>
Closes #9667
Diffstat (limited to 'include/sys')
-rw-r--r-- | include/sys/fs/zfs.h | 25 |
1 files changed, 13 insertions, 12 deletions
diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h index eeb457903..1474e1f04 100644 --- a/include/sys/fs/zfs.h +++ b/include/sys/fs/zfs.h @@ -1190,9 +1190,13 @@ typedef enum { */ typedef enum zfs_ioc { /* - * illumos - 81/128 numbers reserved. + * Core features - 81/128 numbers reserved. */ +#ifdef __FreeBSD__ + ZFS_IOC_FIRST = 0, +#else ZFS_IOC_FIRST = ('Z' << 8), +#endif ZFS_IOC = ZFS_IOC_FIRST, ZFS_IOC_POOL_CREATE = ZFS_IOC_FIRST, /* 0x5a00 */ ZFS_IOC_POOL_DESTROY, /* 0x5a01 */ @@ -1280,18 +1284,15 @@ typedef enum zfs_ioc { ZFS_IOC_WAIT, /* 0x5a53 */ /* - * Linux - 3/64 numbers reserved. + * Per-platform (Optional) - 6/128 numbers reserved. */ - ZFS_IOC_LINUX = ('Z' << 8) + 0x80, - ZFS_IOC_EVENTS_NEXT, /* 0x5a81 */ - ZFS_IOC_EVENTS_CLEAR, /* 0x5a82 */ - ZFS_IOC_EVENTS_SEEK, /* 0x5a83 */ - - /* - * FreeBSD - 1/64 numbers reserved. - */ - ZFS_IOC_FREEBSD = ('Z' << 8) + 0xC0, - + ZFS_IOC_PLATFORM = ZFS_IOC_FIRST + 0x80, + ZFS_IOC_EVENTS_NEXT, /* 0x81 (Linux) */ + ZFS_IOC_EVENTS_CLEAR, /* 0x82 (Linux) */ + ZFS_IOC_EVENTS_SEEK, /* 0x83 (Linux) */ + ZFS_IOC_NEXTBOOT, /* 0x84 (FreeBSD) */ + ZFS_IOC_JAIL, /* 0x85 (FreeBSD) */ + ZFS_IOC_UNJAIL, /* 0x86 (FreeBSD) */ ZFS_IOC_LAST } zfs_ioc_t; |