summaryrefslogtreecommitdiffstats
path: root/include/sys
diff options
context:
space:
mode:
authorBrian Behlendorf <[email protected]>2013-12-13 14:49:33 -0800
committerBrian Behlendorf <[email protected]>2013-12-16 09:41:39 -0800
commit2e0358cbcab49f7be18762e8cb51e642188709e7 (patch)
tree2704cd15588e782e07e9361d458030250cd43730 /include/sys
parentba6a24026c6eb910188c24b5c921fb793d3c998e (diff)
Sync /dev/zfs ioctl ordering
In order to minimize any future disruption caused by the addition and removal /dev/zfs ioctls this patch makes the following changes. 1) Sync ZoL's ioctl ordering such that it matches Illumos. For historic reasons the ZFS_IOC_DESTROY_SNAPS and ZFS_IOC_POOL_REGUID ioctls were out of order. 2) Move Linux and FreeBSD specific ioctls in to their own reserved ranges. This allows us to preserve the existing ordering when new ioctls are added by either Illumos or FreeBSD. When an ioctl is no longer needed it should be retired in place. This change alters the ZFS user/kernel ABI so make sure you rebuild both your user and kernel modules. However, it should allow for a much stabler interface going forward. Signed-off-by: Brian Behlendorf <[email protected]> Signed-off-by: Ned Bass <[email protected]> Closes #1973
Diffstat (limited to 'include/sys')
-rw-r--r--include/sys/fs/zfs.h22
1 files changed, 18 insertions, 4 deletions
diff --git a/include/sys/fs/zfs.h b/include/sys/fs/zfs.h
index 08076bc09..b19ebb6fe 100644
--- a/include/sys/fs/zfs.h
+++ b/include/sys/fs/zfs.h
@@ -768,6 +768,9 @@ typedef struct ddt_histogram {
* /dev/zfs ioctl numbers.
*/
typedef enum zfs_ioc {
+ /*
+ * Illumos - 69/128 numbers reserved.
+ */
ZFS_IOC_FIRST = ('Z' << 8),
ZFS_IOC = ZFS_IOC_FIRST,
ZFS_IOC_POOL_CREATE = ZFS_IOC_FIRST,
@@ -805,7 +808,6 @@ typedef enum zfs_ioc {
ZFS_IOC_ERROR_LOG,
ZFS_IOC_CLEAR,
ZFS_IOC_PROMOTE,
- ZFS_IOC_DESTROY_SNAPS,
ZFS_IOC_SNAPSHOT,
ZFS_IOC_DSOBJ_TO_DSNAME,
ZFS_IOC_OBJ_TO_PATH,
@@ -828,17 +830,29 @@ typedef enum zfs_ioc {
ZFS_IOC_DIFF,
ZFS_IOC_TMP_SNAPSHOT,
ZFS_IOC_OBJ_TO_STATS,
- ZFS_IOC_EVENTS_NEXT,
- ZFS_IOC_EVENTS_CLEAR,
- ZFS_IOC_POOL_REGUID,
ZFS_IOC_SPACE_WRITTEN,
ZFS_IOC_SPACE_SNAPS,
+ ZFS_IOC_DESTROY_SNAPS,
+ ZFS_IOC_POOL_REGUID,
ZFS_IOC_POOL_REOPEN,
ZFS_IOC_SEND_PROGRESS,
ZFS_IOC_LOG_HISTORY,
ZFS_IOC_SEND_NEW,
ZFS_IOC_SEND_SPACE,
ZFS_IOC_CLONE,
+
+ /*
+ * Linux - 3/64 numbers reserved.
+ */
+ ZFS_IOC_LINUX = ('Z' << 8) + 0x80,
+ ZFS_IOC_EVENTS_NEXT,
+ ZFS_IOC_EVENTS_CLEAR,
+
+ /*
+ * FreeBSD - 1/64 numbers reserved.
+ */
+ ZFS_IOC_FREEBSD = ('Z' << 8) + 0xC0,
+
ZFS_IOC_LAST
} zfs_ioc_t;