Deleted Added
full compact
zfs_ioctl_compat.h (247540) zfs_ioctl_compat.h (248571)
1/*
2 * CDDL HEADER START
3 *
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.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 31 unchanged lines hidden (view full) ---

40extern "C" {
41#endif
42
43/*
44 * Backwards ioctl compatibility
45 */
46
47/* ioctl versions for vfs.zfs.version.ioctl */
1/*
2 * CDDL HEADER START
3 *
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.
7 *
8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE

--- 31 unchanged lines hidden (view full) ---

40extern "C" {
41#endif
42
43/*
44 * Backwards ioctl compatibility
45 */
46
47/* ioctl versions for vfs.zfs.version.ioctl */
48#define ZFS_IOCVER_UNDEF -1
49#define ZFS_IOCVER_NONE 0
48#define ZFS_IOCVER_DEADMAN 1
50#define ZFS_IOCVER_DEADMAN 1
49#define ZFS_IOCVER_CURRENT ZFS_IOCVER_DEADMAN
51#define ZFS_IOCVER_LZC 2
52#define ZFS_IOCVER_CURRENT ZFS_IOCVER_LZC
50
51/* compatibility conversion flag */
52#define ZFS_CMD_COMPAT_NONE 0
53#define ZFS_CMD_COMPAT_V15 1
54#define ZFS_CMD_COMPAT_V28 2
53
54/* compatibility conversion flag */
55#define ZFS_CMD_COMPAT_NONE 0
56#define ZFS_CMD_COMPAT_V15 1
57#define ZFS_CMD_COMPAT_V28 2
58#define ZFS_CMD_COMPAT_DEADMAN 3
55
56#define ZFS_IOC_COMPAT_PASS 254
57#define ZFS_IOC_COMPAT_FAIL 255
58
59
60#define ZFS_IOC_COMPAT_PASS 254
61#define ZFS_IOC_COMPAT_FAIL 255
62
63#define ZFS_IOCREQ(ioreq) ((ioreq) & 0xff)
64
59typedef struct zinject_record_v15 {
60 uint64_t zi_objset;
61 uint64_t zi_object;
62 uint64_t zi_start;
63 uint64_t zi_end;
64 uint64_t zi_guid;
65 uint32_t zi_level;
66 uint32_t zi_error;

--- 76 unchanged lines hidden (view full) ---

143 uint8_t zc_simple;
144 uint8_t zc_pad[3]; /* alignment */
145 uint64_t zc_sendobj;
146 uint64_t zc_fromobj;
147 uint64_t zc_createtxg;
148 zfs_stat_t zc_stat;
149} zfs_cmd_v28_t;
150
65typedef struct zinject_record_v15 {
66 uint64_t zi_objset;
67 uint64_t zi_object;
68 uint64_t zi_start;
69 uint64_t zi_end;
70 uint64_t zi_guid;
71 uint32_t zi_level;
72 uint32_t zi_error;

--- 76 unchanged lines hidden (view full) ---

149 uint8_t zc_simple;
150 uint8_t zc_pad[3]; /* alignment */
151 uint64_t zc_sendobj;
152 uint64_t zc_fromobj;
153 uint64_t zc_createtxg;
154 zfs_stat_t zc_stat;
155} zfs_cmd_v28_t;
156
157typedef struct zfs_cmd_deadman {
158 char zc_name[MAXPATHLEN];
159 char zc_value[MAXPATHLEN * 2];
160 char zc_string[MAXNAMELEN];
161 char zc_top_ds[MAXPATHLEN];
162 uint64_t zc_guid;
163 uint64_t zc_nvlist_conf; /* really (char *) */
164 uint64_t zc_nvlist_conf_size;
165 uint64_t zc_nvlist_src; /* really (char *) */
166 uint64_t zc_nvlist_src_size;
167 uint64_t zc_nvlist_dst; /* really (char *) */
168 uint64_t zc_nvlist_dst_size;
169 uint64_t zc_cookie;
170 uint64_t zc_objset_type;
171 uint64_t zc_perm_action;
172 uint64_t zc_history; /* really (char *) */
173 uint64_t zc_history_len;
174 uint64_t zc_history_offset;
175 uint64_t zc_obj;
176 uint64_t zc_iflags; /* internal to zfs(7fs) */
177 zfs_share_t zc_share;
178 uint64_t zc_jailid;
179 dmu_objset_stats_t zc_objset_stats;
180 struct drr_begin zc_begin_record;
181 /* zc_inject_record doesn't change in libzfs_core */
182 zinject_record_t zc_inject_record;
183 boolean_t zc_defer_destroy;
184 boolean_t zc_temphold;
185 uint64_t zc_action_handle;
186 int zc_cleanup_fd;
187 uint8_t zc_simple;
188 uint8_t zc_pad[3]; /* alignment */
189 uint64_t zc_sendobj;
190 uint64_t zc_fromobj;
191 uint64_t zc_createtxg;
192 zfs_stat_t zc_stat;
193} zfs_cmd_deadman_t;
194
151#ifdef _KERNEL
152unsigned static long zfs_ioctl_v15_to_v28[] = {
153 0, /* 0 ZFS_IOC_POOL_CREATE */
154 1, /* 1 ZFS_IOC_POOL_DESTROY */
155 2, /* 2 ZFS_IOC_POOL_IMPORT */
156 3, /* 3 ZFS_IOC_POOL_EXPORT */
157 4, /* 4 ZFS_IOC_POOL_CONFIGS */
158 5, /* 5 ZFS_IOC_POOL_STATS */

--- 108 unchanged lines hidden (view full) ---

267 ZFS_IOC_COMPAT_FAIL, /* 56 ZFS_IOC_TMP_SNAPSHOT */
268 ZFS_IOC_COMPAT_FAIL, /* 57 ZFS_IOC_OBJ_TO_STATS */
269 47, /* 58 ZFS_IOC_JAIL */
270 48, /* 59 ZFS_IOC_UNJAIL */
271};
272#endif /* ! _KERNEL */
273
274#ifdef _KERNEL
195#ifdef _KERNEL
196unsigned static long zfs_ioctl_v15_to_v28[] = {
197 0, /* 0 ZFS_IOC_POOL_CREATE */
198 1, /* 1 ZFS_IOC_POOL_DESTROY */
199 2, /* 2 ZFS_IOC_POOL_IMPORT */
200 3, /* 3 ZFS_IOC_POOL_EXPORT */
201 4, /* 4 ZFS_IOC_POOL_CONFIGS */
202 5, /* 5 ZFS_IOC_POOL_STATS */

--- 108 unchanged lines hidden (view full) ---

311 ZFS_IOC_COMPAT_FAIL, /* 56 ZFS_IOC_TMP_SNAPSHOT */
312 ZFS_IOC_COMPAT_FAIL, /* 57 ZFS_IOC_OBJ_TO_STATS */
313 47, /* 58 ZFS_IOC_JAIL */
314 48, /* 59 ZFS_IOC_UNJAIL */
315};
316#endif /* ! _KERNEL */
317
318#ifdef _KERNEL
275void zfs_ioctl_compat_pre(zfs_cmd_t *, int *, const int);
319int zfs_ioctl_compat_pre(zfs_cmd_t *, int *, const int);
276void zfs_ioctl_compat_post(zfs_cmd_t *, const int, const int);
320void zfs_ioctl_compat_post(zfs_cmd_t *, const int, const int);
321nvlist_t *zfs_ioctl_compat_innvl(zfs_cmd_t *, nvlist_t *, const int,
322 const int);
323nvlist_t *zfs_ioctl_compat_outnvl(zfs_cmd_t *, nvlist_t *, const int,
324 const int);
277#else
325#else
278int zcmd_ioctl_compat(int, unsigned long, zfs_cmd_t *, const int);
326int zcmd_ioctl_compat(int, int, zfs_cmd_t *, const int);
279#endif /* _KERNEL */
280void zfs_cmd_compat_get(zfs_cmd_t *, caddr_t, const int);
327#endif /* _KERNEL */
328void zfs_cmd_compat_get(zfs_cmd_t *, caddr_t, const int);
281void zfs_cmd_compat_put(zfs_cmd_t *, caddr_t, const int);
329void zfs_cmd_compat_put(zfs_cmd_t *, caddr_t, const int, const int);
282
283#ifdef __cplusplus
284}
285#endif
286
287#endif /* _SYS_ZFS_IOCTL_COMPAT_H */
330
331#ifdef __cplusplus
332}
333#endif
334
335#endif /* _SYS_ZFS_IOCTL_COMPAT_H */