4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 * or http://www.opensolaris.org/os/licensing.
10 * See the License for the specific language governing permissions
11 * and limitations under the License.
13 * When distributing Covered Code, include this CDDL HEADER in each
14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
15 * If applicable, add the following below this CDDL HEADER, with the
16 * fields enclosed by brackets "[]" replaced with your own identifying
17 * information: Portions Copyright [yyyy] [name of copyright owner]
22 * Copyright 2014 Xin Li <delphij@FreeBSD.org>. All rights reserved.
23 * Copyright 2013 Martin Matuska <mm@FreeBSD.org>. All rights reserved.
24 * Use is subject to license terms.
27 #ifndef _SYS_ZFS_IOCTL_COMPAT_H
28 #define _SYS_ZFS_IOCTL_COMPAT_H
33 #include <sys/dsl_deleg.h>
34 #include <sys/zfs_ioctl.h>
37 #include <sys/nvpair.h>
45 * Backwards ioctl compatibility
48 /* ioctl versions for vfs.zfs.version.ioctl */
49 #define ZFS_IOCVER_UNDEF -1
50 #define ZFS_IOCVER_NONE 0
51 #define ZFS_IOCVER_DEADMAN 1
52 #define ZFS_IOCVER_LZC 2
53 #define ZFS_IOCVER_ZCMD 3
54 #define ZFS_IOCVER_EDBP 4
55 #define ZFS_IOCVER_RESUME 5
56 #define ZFS_IOCVER_INLANES 6
57 #define ZFS_IOCVER_PAD 7
58 #define ZFS_IOCVER_FREEBSD ZFS_IOCVER_PAD
59 #define ZFS_IOCVER_ZOF 15
61 /* compatibility conversion flag */
62 #define ZFS_CMD_COMPAT_NONE 0
63 #define ZFS_CMD_COMPAT_V15 1
64 #define ZFS_CMD_COMPAT_V28 2
65 #define ZFS_CMD_COMPAT_DEADMAN 3
66 #define ZFS_CMD_COMPAT_LZC 4
67 #define ZFS_CMD_COMPAT_ZCMD 5
68 #define ZFS_CMD_COMPAT_EDBP 6
69 #define ZFS_CMD_COMPAT_RESUME 7
70 #define ZFS_CMD_COMPAT_INLANES 8
72 #define ZFS_IOC_COMPAT_PASS 254
73 #define ZFS_IOC_COMPAT_FAIL 255
75 #define ZFS_IOCREQ(ioreq) ((ioreq) & 0xff)
77 typedef struct zfs_iocparm
{
78 uint32_t zfs_ioctl_version
;
80 uint64_t zfs_cmd_size
;
83 typedef struct zinject_record_v15
{
94 } zinject_record_v15_t
;
96 typedef struct zfs_cmd_v15
{
97 char zc_name
[MAXPATHLEN
];
98 char zc_value
[MAXPATHLEN
];
99 char zc_string
[MAXNAMELEN
];
101 uint64_t zc_nvlist_conf
; /* really (char *) */
102 uint64_t zc_nvlist_conf_size
;
103 uint64_t zc_nvlist_src
; /* really (char *) */
104 uint64_t zc_nvlist_src_size
;
105 uint64_t zc_nvlist_dst
; /* really (char *) */
106 uint64_t zc_nvlist_dst_size
;
108 uint64_t zc_objset_type
;
109 uint64_t zc_perm_action
;
110 uint64_t zc_history
; /* really (char *) */
111 uint64_t zc_history_len
;
112 uint64_t zc_history_offset
;
114 zfs_share_t zc_share
;
116 dmu_objset_stats_t zc_objset_stats
;
117 struct drr_begin zc_begin_record
;
118 zinject_record_v15_t zc_inject_record
;
121 typedef struct zinject_record_v28
{
131 uint32_t zi_failfast
;
132 char zi_func
[MAXNAMELEN
];
136 } zinject_record_v28_t
;
138 typedef struct zfs_cmd_v28
{
139 char zc_name
[MAXPATHLEN
];
140 char zc_value
[MAXPATHLEN
* 2];
141 char zc_string
[MAXNAMELEN
];
142 char zc_top_ds
[MAXPATHLEN
];
144 uint64_t zc_nvlist_conf
; /* really (char *) */
145 uint64_t zc_nvlist_conf_size
;
146 uint64_t zc_nvlist_src
; /* really (char *) */
147 uint64_t zc_nvlist_src_size
;
148 uint64_t zc_nvlist_dst
; /* really (char *) */
149 uint64_t zc_nvlist_dst_size
;
151 uint64_t zc_objset_type
;
152 uint64_t zc_perm_action
;
153 uint64_t zc_history
; /* really (char *) */
154 uint64_t zc_history_len
;
155 uint64_t zc_history_offset
;
157 uint64_t zc_iflags
; /* internal to zfs(7fs) */
158 zfs_share_t zc_share
;
160 dmu_objset_stats_t zc_objset_stats
;
161 struct drr_begin zc_begin_record
;
162 zinject_record_v28_t zc_inject_record
;
163 boolean_t zc_defer_destroy
;
164 boolean_t zc_temphold
;
165 uint64_t zc_action_handle
;
168 uint8_t zc_pad
[3]; /* alignment */
171 uint64_t zc_createtxg
;
175 typedef struct zinject_record_deadman
{
185 uint32_t zi_failfast
;
186 char zi_func
[MAXNAMELEN
];
192 } zinject_record_deadman_t
;
194 typedef struct zfs_cmd_deadman
{
195 char zc_name
[MAXPATHLEN
];
196 char zc_value
[MAXPATHLEN
* 2];
197 char zc_string
[MAXNAMELEN
];
198 char zc_top_ds
[MAXPATHLEN
];
200 uint64_t zc_nvlist_conf
; /* really (char *) */
201 uint64_t zc_nvlist_conf_size
;
202 uint64_t zc_nvlist_src
; /* really (char *) */
203 uint64_t zc_nvlist_src_size
;
204 uint64_t zc_nvlist_dst
; /* really (char *) */
205 uint64_t zc_nvlist_dst_size
;
207 uint64_t zc_objset_type
;
208 uint64_t zc_perm_action
;
209 uint64_t zc_history
; /* really (char *) */
210 uint64_t zc_history_len
;
211 uint64_t zc_history_offset
;
213 uint64_t zc_iflags
; /* internal to zfs(7fs) */
214 zfs_share_t zc_share
;
216 dmu_objset_stats_t zc_objset_stats
;
217 struct drr_begin zc_begin_record
;
218 /* zc_inject_record doesn't change in libzfs_core */
219 zinject_record_deadman_t zc_inject_record
;
220 boolean_t zc_defer_destroy
;
221 boolean_t zc_temphold
;
222 uint64_t zc_action_handle
;
225 uint8_t zc_pad
[3]; /* alignment */
228 uint64_t zc_createtxg
;
232 typedef struct zfs_cmd_zcmd
{
233 char zc_name
[MAXPATHLEN
]; /* name of pool or dataset */
234 uint64_t zc_nvlist_src
; /* really (char *) */
235 uint64_t zc_nvlist_src_size
;
236 uint64_t zc_nvlist_dst
; /* really (char *) */
237 uint64_t zc_nvlist_dst_size
;
238 boolean_t zc_nvlist_dst_filled
; /* put an nvlist in dst? */
242 * The following members are for legacy ioctls which haven't been
243 * converted to the new method.
245 uint64_t zc_history
; /* really (char *) */
246 char zc_value
[MAXPATHLEN
* 2];
247 char zc_string
[MAXNAMELEN
];
249 uint64_t zc_nvlist_conf
; /* really (char *) */
250 uint64_t zc_nvlist_conf_size
;
252 uint64_t zc_objset_type
;
253 uint64_t zc_perm_action
;
254 uint64_t zc_history_len
;
255 uint64_t zc_history_offset
;
257 uint64_t zc_iflags
; /* internal to zfs(7fs) */
258 zfs_share_t zc_share
;
260 dmu_objset_stats_t zc_objset_stats
;
261 struct drr_begin zc_begin_record
;
262 zinject_record_deadman_t zc_inject_record
;
263 boolean_t zc_defer_destroy
;
264 boolean_t zc_temphold
;
265 uint64_t zc_action_handle
;
268 uint8_t zc_pad
[3]; /* alignment */
271 uint64_t zc_createtxg
;
275 typedef struct zfs_cmd_edbp
{
276 char zc_name
[MAXPATHLEN
]; /* name of pool or dataset */
277 uint64_t zc_nvlist_src
; /* really (char *) */
278 uint64_t zc_nvlist_src_size
;
279 uint64_t zc_nvlist_dst
; /* really (char *) */
280 uint64_t zc_nvlist_dst_size
;
281 boolean_t zc_nvlist_dst_filled
; /* put an nvlist in dst? */
285 * The following members are for legacy ioctls which haven't been
286 * converted to the new method.
288 uint64_t zc_history
; /* really (char *) */
289 char zc_value
[MAXPATHLEN
* 2];
290 char zc_string
[MAXNAMELEN
];
292 uint64_t zc_nvlist_conf
; /* really (char *) */
293 uint64_t zc_nvlist_conf_size
;
295 uint64_t zc_objset_type
;
296 uint64_t zc_perm_action
;
297 uint64_t zc_history_len
;
298 uint64_t zc_history_offset
;
300 uint64_t zc_iflags
; /* internal to zfs(7fs) */
301 zfs_share_t zc_share
;
303 dmu_objset_stats_t zc_objset_stats
;
304 struct drr_begin zc_begin_record
;
305 zinject_record_deadman_t zc_inject_record
;
306 uint32_t zc_defer_destroy
;
308 uint64_t zc_action_handle
;
311 uint8_t zc_pad
[3]; /* alignment */
314 uint64_t zc_createtxg
;
318 typedef struct zfs_cmd_resume
{
319 char zc_name
[MAXPATHLEN
]; /* name of pool or dataset */
320 uint64_t zc_nvlist_src
; /* really (char *) */
321 uint64_t zc_nvlist_src_size
;
322 uint64_t zc_nvlist_dst
; /* really (char *) */
323 uint64_t zc_nvlist_dst_size
;
324 boolean_t zc_nvlist_dst_filled
; /* put an nvlist in dst? */
328 * The following members are for legacy ioctls which haven't been
329 * converted to the new method.
331 uint64_t zc_history
; /* really (char *) */
332 char zc_value
[MAXPATHLEN
* 2];
333 char zc_string
[MAXNAMELEN
];
335 uint64_t zc_nvlist_conf
; /* really (char *) */
336 uint64_t zc_nvlist_conf_size
;
338 uint64_t zc_objset_type
;
339 uint64_t zc_perm_action
;
340 uint64_t zc_history_len
;
341 uint64_t zc_history_offset
;
343 uint64_t zc_iflags
; /* internal to zfs(7fs) */
344 zfs_share_t zc_share
;
346 dmu_objset_stats_t zc_objset_stats
;
347 dmu_replay_record_t zc_begin_record
;
348 zinject_record_deadman_t zc_inject_record
;
349 uint32_t zc_defer_destroy
;
351 uint64_t zc_action_handle
;
354 boolean_t zc_resumable
;
357 uint64_t zc_createtxg
;
361 typedef struct zfs_cmd_inlanes
{
362 char zc_name
[MAXPATHLEN
]; /* name of pool or dataset */
363 uint64_t zc_nvlist_src
; /* really (char *) */
364 uint64_t zc_nvlist_src_size
;
365 uint64_t zc_nvlist_dst
; /* really (char *) */
366 uint64_t zc_nvlist_dst_size
;
367 boolean_t zc_nvlist_dst_filled
; /* put an nvlist in dst? */
371 * The following members are for legacy ioctls which haven't been
372 * converted to the new method.
374 uint64_t zc_history
; /* really (char *) */
375 char zc_value
[MAXPATHLEN
* 2];
376 char zc_string
[MAXNAMELEN
];
378 uint64_t zc_nvlist_conf
; /* really (char *) */
379 uint64_t zc_nvlist_conf_size
;
381 uint64_t zc_objset_type
;
382 uint64_t zc_perm_action
;
383 uint64_t zc_history_len
;
384 uint64_t zc_history_offset
;
386 uint64_t zc_iflags
; /* internal to zfs(7fs) */
387 zfs_share_t zc_share
;
389 dmu_objset_stats_t zc_objset_stats
;
390 dmu_replay_record_t zc_begin_record
;
391 zinject_record_t zc_inject_record
;
392 uint32_t zc_defer_destroy
;
394 uint64_t zc_action_handle
;
397 boolean_t zc_resumable
;
400 uint64_t zc_createtxg
;
406 * Note: this struct must have the same layout in 32-bit and 64-bit, so
407 * that 32-bit processes (like /sbin/zfs) can pass it to the 64-bit
408 * kernel. Therefore, we add padding to it so that no "hidden" padding
409 * is automatically added on 64-bit (but not on 32-bit).
411 typedef struct zfs_cmd_legacy
{
412 char zc_name
[MAXPATHLEN
]; /* name of pool or dataset */
413 uint64_t zc_nvlist_src
; /* really (char *) */
414 uint64_t zc_nvlist_src_size
;
415 uint64_t zc_nvlist_dst
; /* really (char *) */
416 uint64_t zc_nvlist_dst_size
;
417 boolean_t zc_nvlist_dst_filled
; /* put an nvlist in dst? */
421 * The following members are for legacy ioctls which haven't been
422 * converted to the new method.
424 uint64_t zc_history
; /* really (char *) */
425 char zc_value
[MAXPATHLEN
* 2];
426 char zc_string
[MAXNAMELEN
];
428 uint64_t zc_nvlist_conf
; /* really (char *) */
429 uint64_t zc_nvlist_conf_size
;
431 uint64_t zc_objset_type
;
432 uint64_t zc_perm_action
;
433 uint64_t zc_history_len
;
434 uint64_t zc_history_offset
;
436 uint64_t zc_iflags
; /* internal to zfs(7fs) */
437 zfs_share_t zc_share
;
440 dmu_objset_stats_t zc_objset_stats
;
441 uint64_t zc_freebsd_drr_pad
;
442 struct drr_begin zc_begin_record
;
443 zinject_record_t zc_inject_record
;
444 uint32_t zc_defer_destroy
;
446 uint64_t zc_action_handle
;
450 boolean_t zc_resumable
;
454 uint64_t zc_createtxg
;
458 unsigned static long zfs_ioctl_bsd12_to_zof
[] = {
459 ZFS_IOC_POOL_CREATE
, /* 0x00 */
460 ZFS_IOC_POOL_DESTROY
, /* 0x01 */
461 ZFS_IOC_POOL_IMPORT
, /* 0x02 */
462 ZFS_IOC_POOL_EXPORT
, /* 0x03 */
463 ZFS_IOC_POOL_CONFIGS
, /* 0x04 */
464 ZFS_IOC_POOL_STATS
, /* 0x05 */
465 ZFS_IOC_POOL_TRYIMPORT
, /* 0x06 */
466 ZFS_IOC_POOL_SCAN
, /* 0x07 */
467 ZFS_IOC_POOL_FREEZE
, /* 0x08 */
468 ZFS_IOC_POOL_UPGRADE
, /* 0x09 */
469 ZFS_IOC_POOL_GET_HISTORY
, /* 0x0a */
470 ZFS_IOC_VDEV_ADD
, /* 0x0b */
471 ZFS_IOC_VDEV_REMOVE
, /* 0x0c */
472 ZFS_IOC_VDEV_SET_STATE
, /* 0x0d */
473 ZFS_IOC_VDEV_ATTACH
, /* 0x0e */
474 ZFS_IOC_VDEV_DETACH
, /* 0x0f */
475 ZFS_IOC_VDEV_SETPATH
, /* 0x10 */
476 ZFS_IOC_VDEV_SETFRU
, /* 0x11 */
477 ZFS_IOC_OBJSET_STATS
, /* 0x12 */
478 ZFS_IOC_OBJSET_ZPLPROPS
, /* 0x13 */
479 ZFS_IOC_DATASET_LIST_NEXT
, /* 0x14 */
480 ZFS_IOC_SNAPSHOT_LIST_NEXT
, /* 0x15 */
481 ZFS_IOC_SET_PROP
, /* 0x16 */
482 ZFS_IOC_CREATE
, /* 0x17 */
483 ZFS_IOC_DESTROY
, /* 0x18 */
484 ZFS_IOC_ROLLBACK
, /* 0x19 */
485 ZFS_IOC_RENAME
, /* 0x1a */
486 ZFS_IOC_RECV
, /* 0x1b */
487 ZFS_IOC_SEND
, /* 0x1c */
488 ZFS_IOC_INJECT_FAULT
, /* 0x1d */
489 ZFS_IOC_CLEAR_FAULT
, /* 0x1e */
490 ZFS_IOC_INJECT_LIST_NEXT
, /* 0x1f */
491 ZFS_IOC_ERROR_LOG
, /* 0x20 */
492 ZFS_IOC_CLEAR
, /* 0x21 */
493 ZFS_IOC_PROMOTE
, /* 0x22 */
494 /* start of mismatch */
495 ZFS_IOC_DESTROY_SNAPS
, /* 0x23:0x3b */
496 ZFS_IOC_SNAPSHOT
, /* 0x24:0x23 */
497 ZFS_IOC_DSOBJ_TO_DSNAME
, /* 0x25:0x24 */
498 ZFS_IOC_OBJ_TO_PATH
, /* 0x26:0x25 */
499 ZFS_IOC_POOL_SET_PROPS
, /* 0x27:0x26 */
500 ZFS_IOC_POOL_GET_PROPS
, /* 0x28:0x27 */
501 ZFS_IOC_SET_FSACL
, /* 0x29:0x28 */
502 ZFS_IOC_GET_FSACL
, /* 0x30:0x29 */
503 ZFS_IOC_SHARE
, /* 0x2b:0x2a */
504 ZFS_IOC_INHERIT_PROP
, /* 0x2c:0x2b */
505 ZFS_IOC_SMB_ACL
, /* 0x2d:0x2c */
506 ZFS_IOC_USERSPACE_ONE
, /* 0x2e:0x2d */
507 ZFS_IOC_USERSPACE_MANY
, /* 0x2f:0x2e */
508 ZFS_IOC_USERSPACE_UPGRADE
, /* 0x30:0x2f */
509 ZFS_IOC_HOLD
, /* 0x31:0x30 */
510 ZFS_IOC_RELEASE
, /* 0x32:0x31 */
511 ZFS_IOC_GET_HOLDS
, /* 0x33:0x32 */
512 ZFS_IOC_OBJSET_RECVD_PROPS
, /* 0x34:0x33 */
513 ZFS_IOC_VDEV_SPLIT
, /* 0x35:0x34 */
514 ZFS_IOC_NEXT_OBJ
, /* 0x36:0x35 */
515 ZFS_IOC_DIFF
, /* 0x37:0x36 */
516 ZFS_IOC_TMP_SNAPSHOT
, /* 0x38:0x37 */
517 ZFS_IOC_OBJ_TO_STATS
, /* 0x39:0x38 */
518 ZFS_IOC_JAIL
, /* 0x3a:0xc2 */
519 ZFS_IOC_UNJAIL
, /* 0x3b:0xc3 */
520 ZFS_IOC_POOL_REGUID
, /* 0x3c:0x3c */
521 ZFS_IOC_SPACE_WRITTEN
, /* 0x3d:0x39 */
522 ZFS_IOC_SPACE_SNAPS
, /* 0x3e:0x3a */
523 ZFS_IOC_SEND_PROGRESS
, /* 0x3f:0x3e */
524 ZFS_IOC_POOL_REOPEN
, /* 0x40:0x3d */
525 ZFS_IOC_LOG_HISTORY
, /* 0x41:0x3f */
526 ZFS_IOC_SEND_NEW
, /* 0x42:0x40 */
527 ZFS_IOC_SEND_SPACE
, /* 0x43:0x41 */
528 ZFS_IOC_CLONE
, /* 0x44:0x42 */
529 ZFS_IOC_BOOKMARK
, /* 0x45:0x43 */
530 ZFS_IOC_GET_BOOKMARKS
, /* 0x46:0x44 */
531 ZFS_IOC_DESTROY_BOOKMARKS
, /* 0x47:0x45 */
532 ZFS_IOC_NEXTBOOT
, /* 0x48:0xc1 */
533 ZFS_IOC_CHANNEL_PROGRAM
, /* 0x49:0x48 */
534 ZFS_IOC_REMAP
, /* 0x4a:0x4c */
535 ZFS_IOC_POOL_CHECKPOINT
, /* 0x4b:0x4d */
536 ZFS_IOC_POOL_DISCARD_CHECKPOINT
, /* 0x4c:0x4e */
537 ZFS_IOC_POOL_INITIALIZE
, /* 0x4d:0x4f */
540 unsigned static long zfs_ioctl_v15_to_v28
[] = {
541 0, /* 0 ZFS_IOC_POOL_CREATE */
542 1, /* 1 ZFS_IOC_POOL_DESTROY */
543 2, /* 2 ZFS_IOC_POOL_IMPORT */
544 3, /* 3 ZFS_IOC_POOL_EXPORT */
545 4, /* 4 ZFS_IOC_POOL_CONFIGS */
546 5, /* 5 ZFS_IOC_POOL_STATS */
547 6, /* 6 ZFS_IOC_POOL_TRYIMPORT */
548 7, /* 7 ZFS_IOC_POOL_SCRUB */
549 8, /* 8 ZFS_IOC_POOL_FREEZE */
550 9, /* 9 ZFS_IOC_POOL_UPGRADE */
551 10, /* 10 ZFS_IOC_POOL_GET_HISTORY */
552 11, /* 11 ZFS_IOC_VDEV_ADD */
553 12, /* 12 ZFS_IOC_VDEV_REMOVE */
554 13, /* 13 ZFS_IOC_VDEV_SET_STATE */
555 14, /* 14 ZFS_IOC_VDEV_ATTACH */
556 15, /* 15 ZFS_IOC_VDEV_DETACH */
557 16, /* 16 ZFS_IOC_VDEV_SETPATH */
558 18, /* 17 ZFS_IOC_OBJSET_STATS */
559 19, /* 18 ZFS_IOC_OBJSET_ZPLPROPS */
560 20, /* 19 ZFS_IOC_DATASET_LIST_NEXT */
561 21, /* 20 ZFS_IOC_SNAPSHOT_LIST_NEXT */
562 22, /* 21 ZFS_IOC_SET_PROP */
563 ZFS_IOC_COMPAT_PASS
, /* 22 ZFS_IOC_CREATE_MINOR */
564 ZFS_IOC_COMPAT_PASS
, /* 23 ZFS_IOC_REMOVE_MINOR */
565 23, /* 24 ZFS_IOC_CREATE */
566 24, /* 25 ZFS_IOC_DESTROY */
567 25, /* 26 ZFS_IOC_ROLLBACK */
568 26, /* 27 ZFS_IOC_RENAME */
569 27, /* 28 ZFS_IOC_RECV */
570 28, /* 29 ZFS_IOC_SEND */
571 29, /* 30 ZFS_IOC_INJECT_FAULT */
572 30, /* 31 ZFS_IOC_CLEAR_FAULT */
573 31, /* 32 ZFS_IOC_INJECT_LIST_NEXT */
574 32, /* 33 ZFS_IOC_ERROR_LOG */
575 33, /* 34 ZFS_IOC_CLEAR */
576 34, /* 35 ZFS_IOC_PROMOTE */
577 35, /* 36 ZFS_IOC_DESTROY_SNAPS */
578 36, /* 37 ZFS_IOC_SNAPSHOT */
579 37, /* 38 ZFS_IOC_DSOBJ_TO_DSNAME */
580 38, /* 39 ZFS_IOC_OBJ_TO_PATH */
581 39, /* 40 ZFS_IOC_POOL_SET_PROPS */
582 40, /* 41 ZFS_IOC_POOL_GET_PROPS */
583 41, /* 42 ZFS_IOC_SET_FSACL */
584 42, /* 43 ZFS_IOC_GET_FSACL */
585 ZFS_IOC_COMPAT_PASS
, /* 44 ZFS_IOC_ISCSI_PERM_CHECK */
586 43, /* 45 ZFS_IOC_SHARE */
587 44, /* 46 ZFS_IOC_IHNERIT_PROP */
588 58, /* 47 ZFS_IOC_JAIL */
589 59, /* 48 ZFS_IOC_UNJAIL */
590 45, /* 49 ZFS_IOC_SMB_ACL */
591 46, /* 50 ZFS_IOC_USERSPACE_ONE */
592 47, /* 51 ZFS_IOC_USERSPACE_MANY */
593 48, /* 52 ZFS_IOC_USERSPACE_UPGRADE */
594 17, /* 53 ZFS_IOC_SETFRU */
598 unsigned static long zfs_ioctl_v28_to_v15
[] = {
599 0, /* 0 ZFS_IOC_POOL_CREATE */
600 1, /* 1 ZFS_IOC_POOL_DESTROY */
601 2, /* 2 ZFS_IOC_POOL_IMPORT */
602 3, /* 3 ZFS_IOC_POOL_EXPORT */
603 4, /* 4 ZFS_IOC_POOL_CONFIGS */
604 5, /* 5 ZFS_IOC_POOL_STATS */
605 6, /* 6 ZFS_IOC_POOL_TRYIMPORT */
606 7, /* 7 ZFS_IOC_POOL_SCAN */
607 8, /* 8 ZFS_IOC_POOL_FREEZE */
608 9, /* 9 ZFS_IOC_POOL_UPGRADE */
609 10, /* 10 ZFS_IOC_POOL_GET_HISTORY */
610 11, /* 11 ZFS_IOC_VDEV_ADD */
611 12, /* 12 ZFS_IOC_VDEV_REMOVE */
612 13, /* 13 ZFS_IOC_VDEV_SET_STATE */
613 14, /* 14 ZFS_IOC_VDEV_ATTACH */
614 15, /* 15 ZFS_IOC_VDEV_DETACH */
615 16, /* 16 ZFS_IOC_VDEV_SETPATH */
616 53, /* 17 ZFS_IOC_VDEV_SETFRU */
617 17, /* 18 ZFS_IOC_OBJSET_STATS */
618 18, /* 19 ZFS_IOC_OBJSET_ZPLPROPS */
619 19, /* 20 ZFS_IOC_DATASET_LIST_NEXT */
620 20, /* 21 ZFS_IOC_SNAPSHOT_LIST_NEXT */
621 21, /* 22 ZFS_IOC_SET_PROP */
622 24, /* 23 ZFS_IOC_CREATE */
623 25, /* 24 ZFS_IOC_DESTROY */
624 26, /* 25 ZFS_IOC_ROLLBACK */
625 27, /* 26 ZFS_IOC_RENAME */
626 28, /* 27 ZFS_IOC_RECV */
627 29, /* 28 ZFS_IOC_SEND */
628 30, /* 39 ZFS_IOC_INJECT_FAULT */
629 31, /* 30 ZFS_IOC_CLEAR_FAULT */
630 32, /* 31 ZFS_IOC_INJECT_LIST_NEXT */
631 33, /* 32 ZFS_IOC_ERROR_LOG */
632 34, /* 33 ZFS_IOC_CLEAR */
633 35, /* 34 ZFS_IOC_PROMOTE */
634 36, /* 35 ZFS_IOC_DESTROY_SNAPS */
635 37, /* 36 ZFS_IOC_SNAPSHOT */
636 38, /* 37 ZFS_IOC_DSOBJ_TO_DSNAME */
637 39, /* 38 ZFS_IOC_OBJ_TO_PATH */
638 40, /* 39 ZFS_IOC_POOL_SET_PROPS */
639 41, /* 40 ZFS_IOC_POOL_GET_PROPS */
640 42, /* 41 ZFS_IOC_SET_FSACL */
641 43, /* 42 ZFS_IOC_GET_FSACL */
642 45, /* 43 ZFS_IOC_SHARE */
643 46, /* 44 ZFS_IOC_IHNERIT_PROP */
644 49, /* 45 ZFS_IOC_SMB_ACL */
645 50, /* 46 ZFS_IOC_USERSPACE_ONE */
646 51, /* 47 ZFS_IOC_USERSPACE_MANY */
647 52, /* 48 ZFS_IOC_USERSPACE_UPGRADE */
648 ZFS_IOC_COMPAT_FAIL
, /* 49 ZFS_IOC_HOLD */
649 ZFS_IOC_COMPAT_FAIL
, /* 50 ZFS_IOC_RELEASE */
650 ZFS_IOC_COMPAT_FAIL
, /* 51 ZFS_IOC_GET_HOLDS */
651 ZFS_IOC_COMPAT_FAIL
, /* 52 ZFS_IOC_OBJSET_RECVD_PROPS */
652 ZFS_IOC_COMPAT_FAIL
, /* 53 ZFS_IOC_VDEV_SPLIT */
653 ZFS_IOC_COMPAT_FAIL
, /* 54 ZFS_IOC_NEXT_OBJ */
654 ZFS_IOC_COMPAT_FAIL
, /* 55 ZFS_IOC_DIFF */
655 ZFS_IOC_COMPAT_FAIL
, /* 56 ZFS_IOC_TMP_SNAPSHOT */
656 ZFS_IOC_COMPAT_FAIL
, /* 57 ZFS_IOC_OBJ_TO_STATS */
657 47, /* 58 ZFS_IOC_JAIL */
658 48, /* 59 ZFS_IOC_UNJAIL */
660 #endif /* ! _KERNEL */
663 int zfs_ioctl_compat_pre(zfs_cmd_t
*, int *, const int);
664 void zfs_ioctl_compat_post(zfs_cmd_t
*, const int, const int);
665 nvlist_t
*zfs_ioctl_compat_innvl(zfs_cmd_t
*, nvlist_t
*, const int,
667 nvlist_t
*zfs_ioctl_compat_outnvl(zfs_cmd_t
*, nvlist_t
*, const int,
670 void zfs_cmd_compat_get(zfs_cmd_t
*, caddr_t
, const int);
671 void zfs_cmd_compat_put(zfs_cmd_t
*, caddr_t
, const int, const int);
677 #endif /* _SYS_ZFS_IOCTL_COMPAT_H */