Mercurial > illumos > illumos-gate
annotate usr/src/uts/common/fs/zfs/sys/zfs_ioctl.h @ 11007:216d8396182e
PSARC/2009/557 ZFS send dedup
6812638 zfs send intra-stream dedup
6887817 want snapshot filtering for zfs send
6812603 zfs send can aggregate free records
author | Lori Alt <Lori.Alt@Sun.COM> |
---|---|
date | Mon, 09 Nov 2009 11:04:55 -0700 |
parents | 8aac17999e4d |
children | 462283cb4096 |
rev | line source |
---|---|
789 | 1 /* |
2 * CDDL HEADER START | |
3 * | |
4 * The contents of this file are subject to the terms of the | |
1544 | 5 * Common Development and Distribution License (the "License"). |
6 * You may not use this file except in compliance with the License. | |
789 | 7 * |
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. | |
12 * | |
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] | |
18 * | |
19 * CDDL HEADER END | |
20 */ | |
21 /* | |
8934
8ff6afa44187
6709704 smbtorture RAW-BENCH-OPLOCK test fails (when oplocks enabled)
jose borrego <Jose.Borrego@Sun.COM>
parents:
6492
diff
changeset
|
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
789 | 23 * Use is subject to license terms. |
24 */ | |
25 | |
26 #ifndef _SYS_ZFS_IOCTL_H | |
27 #define _SYS_ZFS_IOCTL_H | |
28 | |
29 #include <sys/cred.h> | |
30 #include <sys/dmu.h> | |
1544 | 31 #include <sys/zio.h> |
4543 | 32 #include <sys/dsl_deleg.h> |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
33 #include <sys/spa.h> |
789 | 34 |
5331 | 35 #ifdef _KERNEL |
36 #include <sys/nvpair.h> | |
37 #endif /* _KERNEL */ | |
38 | |
789 | 39 #ifdef __cplusplus |
40 extern "C" { | |
41 #endif | |
42 | |
43 /* | |
44 * Property values for snapdir | |
45 */ | |
849
8d799fd81a9b
6345023 /dev/zfs fails to open once ZFS module is unloaded
bonwick
parents:
789
diff
changeset
|
46 #define ZFS_SNAPDIR_HIDDEN 0 |
8d799fd81a9b
6345023 /dev/zfs fails to open once ZFS module is unloaded
bonwick
parents:
789
diff
changeset
|
47 #define ZFS_SNAPDIR_VISIBLE 1 |
789 | 48 |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
49 /* |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
50 * Field manipulation macros for the drr_versioninfo field of the |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
51 * send stream header. |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
52 */ |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
53 |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
54 /* |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
55 * Header types for zfs send streams. |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
56 */ |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
57 typedef enum drr_headertype { |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
58 DMU_SUBSTREAM = 0x1, |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
59 DMU_COMPOUNDSTREAM = 0x2 |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
60 } drr_headertype_t; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
61 |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
62 #define DMU_GET_STREAM_HDRTYPE(vi) BF64_GET((vi), 0, 2) |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
63 #define DMU_SET_STREAM_HDRTYPE(vi, x) BF64_SET((vi), 0, 2, x) |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
64 |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
65 #define DMU_GET_FEATUREFLAGS(vi) BF64_GET((vi), 2, 30) |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
66 #define DMU_SET_FEATUREFLAGS(vi, x) BF64_SET((vi), 2, 30, x) |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
67 |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
68 /* |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
69 * Feature flags for zfs send streams (flags in drr_versioninfo) |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
70 */ |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
71 |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
72 #define DMU_BACKUP_FEATURE_DEDUP (0x1) |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
73 |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
74 /* |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
75 * Mask of all supported backup features |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
76 */ |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
77 #define DMU_BACKUP_FEATURE_MASK (DMU_BACKUP_FEATURE_DEDUP) |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
78 |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
79 /* Are all features in the given flag word currently supported? */ |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
80 #define DMU_STREAM_SUPPORTED(x) (!((x) & ~DMU_BACKUP_FEATURE_MASK)) |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
81 |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
82 /* |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
83 * The drr_versioninfo field of the dmu_replay_record has the |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
84 * following layout: |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
85 * |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
86 * 64 56 48 40 32 24 16 8 0 |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
87 * +-------+-------+-------+-------+-------+-------+-------+-------+ |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
88 * | reserved | feature-flags |C|S| |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
89 * +-------+-------+-------+-------+-------+-------+-------+-------+ |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
90 * |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
91 * The low order two bits indicate the header type: SUBSTREAM (0x1) |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
92 * or COMPOUNDSTREAM (0x2). Using two bits for this is historical: |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
93 * this field used to be a version number, where the two version types |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
94 * were 1 and 2. Using two bits for this allows earlier versions of |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
95 * the code to be able to recognize send streams that don't use any |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
96 * of the features indicated by feature flags. |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
97 */ |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
98 |
789 | 99 #define DMU_BACKUP_MAGIC 0x2F5bacbacULL |
100 | |
6492
903545192033
6654808 FIGNORECASE lookups in a zfs xattr dir don't provide 'realname' data
timh
parents:
5498
diff
changeset
|
101 #define DRR_FLAG_CLONE (1<<0) |
903545192033
6654808 FIGNORECASE lookups in a zfs xattr dir don't provide 'realname' data
timh
parents:
5498
diff
changeset
|
102 #define DRR_FLAG_CI_DATA (1<<1) |
5367 | 103 |
789 | 104 /* |
105 * zfs ioctl command structure | |
106 */ | |
107 typedef struct dmu_replay_record { | |
108 enum { | |
109 DRR_BEGIN, DRR_OBJECT, DRR_FREEOBJECTS, | |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
110 DRR_WRITE, DRR_FREE, DRR_END, DRR_WRITE_BYREF, |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
111 DRR_NUMTYPES |
789 | 112 } drr_type; |
5367 | 113 uint32_t drr_payloadlen; |
789 | 114 union { |
115 struct drr_begin { | |
116 uint64_t drr_magic; | |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
117 uint64_t drr_versioninfo; /* was drr_version */ |
789 | 118 uint64_t drr_creation_time; |
119 dmu_objset_type_t drr_type; | |
5367 | 120 uint32_t drr_flags; |
789 | 121 uint64_t drr_toguid; |
122 uint64_t drr_fromguid; | |
123 char drr_toname[MAXNAMELEN]; | |
124 } drr_begin; | |
125 struct drr_end { | |
1544 | 126 zio_cksum_t drr_checksum; |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
127 uint64_t drr_toguid; |
789 | 128 } drr_end; |
129 struct drr_object { | |
130 uint64_t drr_object; | |
131 dmu_object_type_t drr_type; | |
132 dmu_object_type_t drr_bonustype; | |
133 uint32_t drr_blksz; | |
134 uint32_t drr_bonuslen; | |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
135 uint8_t drr_checksumtype; |
789 | 136 uint8_t drr_compress; |
137 uint8_t drr_pad[6]; | |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
138 uint64_t drr_toguid; |
2885 | 139 /* bonus content follows */ |
789 | 140 } drr_object; |
141 struct drr_freeobjects { | |
142 uint64_t drr_firstobj; | |
143 uint64_t drr_numobjs; | |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
144 uint64_t drr_toguid; |
789 | 145 } drr_freeobjects; |
146 struct drr_write { | |
147 uint64_t drr_object; | |
148 dmu_object_type_t drr_type; | |
149 uint32_t drr_pad; | |
150 uint64_t drr_offset; | |
151 uint64_t drr_length; | |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
152 uint64_t drr_toguid; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
153 uint8_t drr_checksumtype; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
154 uint8_t drr_pad2[7]; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
155 zio_cksum_t drr_blkcksum; |
2885 | 156 /* content follows */ |
789 | 157 } drr_write; |
158 struct drr_free { | |
159 uint64_t drr_object; | |
160 uint64_t drr_offset; | |
161 uint64_t drr_length; | |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
162 uint64_t drr_toguid; |
789 | 163 } drr_free; |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
164 struct drr_write_byref { |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
165 /* where to put the data */ |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
166 uint64_t drr_object; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
167 uint64_t drr_offset; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
168 uint64_t drr_length; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
169 uint64_t drr_toguid; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
170 /* where to find the prior copy of the data */ |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
171 uint64_t drr_refguid; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
172 uint64_t drr_refobject; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
173 uint64_t drr_refoffset; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
174 uint8_t drr_checksumtype; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
175 uint8_t drr_pad[7]; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
176 zio_cksum_t drr_blkcksum; |
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
177 } drr_write_byref; |
789 | 178 } drr_u; |
179 } dmu_replay_record_t; | |
180 | |
1544 | 181 typedef struct zinject_record { |
182 uint64_t zi_objset; | |
183 uint64_t zi_object; | |
184 uint64_t zi_start; | |
185 uint64_t zi_end; | |
186 uint64_t zi_guid; | |
187 uint32_t zi_level; | |
188 uint32_t zi_error; | |
189 uint64_t zi_type; | |
190 uint32_t zi_freq; | |
9725
0bf7402e8022
6843014 ZFS B_FAILFAST handling is broken
Eric Schrock <Eric.Schrock@Sun.COM>
parents:
9643
diff
changeset
|
191 uint32_t zi_failfast; |
10594
986cb68d2347
6574286 removing a slog doesn't work
George Wilson <George.Wilson@Sun.COM>
parents:
10342
diff
changeset
|
192 char zi_func[MAXNAMELEN]; |
10685
931790026ac6
6846163 ZFS continues to use faulted logzilla, bringing system to a crawl
George Wilson <George.Wilson@Sun.COM>
parents:
10602
diff
changeset
|
193 uint32_t zi_iotype; |
10921
8aac17999e4d
PSARC 2009/479 zpool recovery support
Tim Haley <Tim.Haley@Sun.COM>
parents:
10685
diff
changeset
|
194 int32_t zi_duration; |
8aac17999e4d
PSARC 2009/479 zpool recovery support
Tim Haley <Tim.Haley@Sun.COM>
parents:
10685
diff
changeset
|
195 uint64_t zi_timer; |
1544 | 196 } zinject_record_t; |
197 | |
198 #define ZINJECT_NULL 0x1 | |
199 #define ZINJECT_FLUSH_ARC 0x2 | |
200 #define ZINJECT_UNLOAD_SPA 0x4 | |
201 | |
4543 | 202 typedef struct zfs_share { |
203 uint64_t z_exportdata; | |
204 uint64_t z_sharedata; | |
205 uint64_t z_sharetype; /* 0 = share, 1 = unshare */ | |
206 uint64_t z_sharemax; /* max length of share string */ | |
207 } zfs_share_t; | |
208 | |
5498
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
209 /* |
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
210 * ZFS file systems may behave the usual, POSIX-compliant way, where |
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
211 * name lookups are case-sensitive. They may also be set up so that |
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
212 * all the name lookups are case-insensitive, or so that only some |
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
213 * lookups, the ones that set an FIGNORECASE flag, are case-insensitive. |
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
214 */ |
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
215 typedef enum zfs_case { |
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
216 ZFS_CASE_SENSITIVE, |
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
217 ZFS_CASE_INSENSITIVE, |
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
218 ZFS_CASE_MIXED |
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
219 } zfs_case_t; |
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
220 |
789 | 221 typedef struct zfs_cmd { |
2467
9829873580a5
6443585 zpool create of poolname > 250 and < 256 characters panics in debug printout
ek110237
parents:
1544
diff
changeset
|
222 char zc_name[MAXPATHLEN]; |
3444
dc160a70a50d
6410433 'zpool status -v' would be more useful with filenames
ek110237
parents:
2926
diff
changeset
|
223 char zc_value[MAXPATHLEN * 2]; |
5367 | 224 char zc_string[MAXNAMELEN]; |
11007
216d8396182e
PSARC/2009/557 ZFS send dedup
Lori Alt <Lori.Alt@Sun.COM>
parents:
10921
diff
changeset
|
225 char zc_top_ds[MAXPATHLEN]; |
1544 | 226 uint64_t zc_guid; |
5094 | 227 uint64_t zc_nvlist_conf; /* really (char *) */ |
228 uint64_t zc_nvlist_conf_size; | |
229 uint64_t zc_nvlist_src; /* really (char *) */ | |
2676 | 230 uint64_t zc_nvlist_src_size; |
5094 | 231 uint64_t zc_nvlist_dst; /* really (char *) */ |
2676 | 232 uint64_t zc_nvlist_dst_size; |
789 | 233 uint64_t zc_cookie; |
234 uint64_t zc_objset_type; | |
4543 | 235 uint64_t zc_perm_action; |
5094 | 236 uint64_t zc_history; /* really (char *) */ |
4543 | 237 uint64_t zc_history_len; |
2926 | 238 uint64_t zc_history_offset; |
3444
dc160a70a50d
6410433 'zpool status -v' would be more useful with filenames
ek110237
parents:
2926
diff
changeset
|
239 uint64_t zc_obj; |
9643
ffd8e7765f02
6736004 zvols need an additional property for comstar support
Eric Taylor <Eric.Taylor@Sun.COM>
parents:
9396
diff
changeset
|
240 uint64_t zc_iflags; /* internal to zfs(7fs) */ |
4543 | 241 zfs_share_t zc_share; |
789 | 242 dmu_objset_stats_t zc_objset_stats; |
243 struct drr_begin zc_begin_record; | |
1544 | 244 zinject_record_t zc_inject_record; |
10242
c40d075fbca6
PSARC/2009/297 zfs snapshot holds
Chris Kirby <chris.kirby@sun.com>
parents:
9725
diff
changeset
|
245 boolean_t zc_defer_destroy; |
10342
108f0058f837
6833815 scheduled snapshots deleted per snapshot policy can lead to replication failures
Chris Kirby <chris.kirby@sun.com>
parents:
10242
diff
changeset
|
246 boolean_t zc_temphold; |
789 | 247 } zfs_cmd_t; |
248 | |
9396
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8934
diff
changeset
|
249 typedef struct zfs_useracct { |
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8934
diff
changeset
|
250 char zu_domain[256]; |
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8934
diff
changeset
|
251 uid_t zu_rid; |
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8934
diff
changeset
|
252 uint32_t zu_pad; |
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8934
diff
changeset
|
253 uint64_t zu_space; |
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8934
diff
changeset
|
254 } zfs_useracct_t; |
f41cf682d0d3
PSARC/2009/204 ZFS user/group quotas & space accounting
Matthew Ahrens <Matthew.Ahrens@Sun.COM>
parents:
8934
diff
changeset
|
255 |
849
8d799fd81a9b
6345023 /dev/zfs fails to open once ZFS module is unloaded
bonwick
parents:
789
diff
changeset
|
256 #define ZVOL_MAX_MINOR (1 << 16) |
8d799fd81a9b
6345023 /dev/zfs fails to open once ZFS module is unloaded
bonwick
parents:
789
diff
changeset
|
257 #define ZFS_MIN_MINOR (ZVOL_MAX_MINOR + 1) |
8d799fd81a9b
6345023 /dev/zfs fails to open once ZFS module is unloaded
bonwick
parents:
789
diff
changeset
|
258 |
789 | 259 #ifdef _KERNEL |
260 | |
5331 | 261 typedef struct zfs_creat { |
5498
334b476844ca
6622831 normalization properties are not preserved by "zfs send"
timh
parents:
5367
diff
changeset
|
262 nvlist_t *zct_zplprops; |
5331 | 263 nvlist_t *zct_props; |
264 } zfs_creat_t; | |
265 | |
789 | 266 extern dev_info_t *zfs_dip; |
267 | |
4543 | 268 extern int zfs_secpolicy_snapshot_perms(const char *name, cred_t *cr); |
269 extern int zfs_secpolicy_rename_perms(const char *from, | |
270 const char *to, cred_t *cr); | |
271 extern int zfs_secpolicy_destroy_perms(const char *name, cred_t *cr); | |
789 | 272 extern int zfs_busy(void); |
4007 | 273 extern int zfs_unmount_snap(char *, void *); |
789 | 274 |
275 #endif /* _KERNEL */ | |
276 | |
277 #ifdef __cplusplus | |
278 } | |
279 #endif | |
280 | |
281 #endif /* _SYS_ZFS_IOCTL_H */ |