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 /*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 /*
27 * Copyright (c) 2012, 2015 by Delphix. All rights reserved.
28 */
29
30 #ifndef _ZIO_IMPL_H
31 #define _ZIO_IMPL_H
32
33 #include <sys/zfs_context.h>
34 #include <sys/zio.h>
35
36 #ifdef __cplusplus
37 extern "C" {
38 #endif
39
40 /*
41 * XXX -- Describe ZFS I/O pipeline here. Fill in as needed.
42 *
43 * The ZFS I/O pipeline is comprised of various stages which are defined
44 * in the zio_stage enum below. The individual stages are used to construct
45 * these basic I/O operations: Read, Write, Free, Claim, and Ioctl.
46 *
161 (ZIO_INTERLOCK_STAGES | \
162 ZIO_VDEV_IO_STAGES | \
163 ZIO_STAGE_CHECKSUM_VERIFY)
164
165 #define ZIO_READ_PHYS_PIPELINE \
166 ZIO_READ_COMMON_STAGES
167
168 #define ZIO_READ_PIPELINE \
169 (ZIO_READ_COMMON_STAGES | \
170 ZIO_STAGE_READ_BP_INIT)
171
172 #define ZIO_DDT_CHILD_READ_PIPELINE \
173 ZIO_READ_COMMON_STAGES
174
175 #define ZIO_DDT_READ_PIPELINE \
176 (ZIO_INTERLOCK_STAGES | \
177 ZIO_STAGE_READ_BP_INIT | \
178 ZIO_STAGE_DDT_READ_START | \
179 ZIO_STAGE_DDT_READ_DONE)
180
181 #define ZIO_WRITE_COMMON_STAGES \
182 (ZIO_INTERLOCK_STAGES | \
183 ZIO_VDEV_IO_STAGES | \
184 ZIO_STAGE_ISSUE_ASYNC | \
185 ZIO_STAGE_CHECKSUM_GENERATE)
186
187 #define ZIO_WRITE_PHYS_PIPELINE \
188 ZIO_WRITE_COMMON_STAGES
189
190 #define ZIO_REWRITE_PIPELINE \
191 (ZIO_WRITE_COMMON_STAGES | \
192 ZIO_STAGE_WRITE_COMPRESS | \
193 ZIO_STAGE_WRITE_BP_INIT)
194
195 #define ZIO_WRITE_PIPELINE \
196 (ZIO_WRITE_COMMON_STAGES | \
197 ZIO_STAGE_WRITE_BP_INIT | \
198 ZIO_STAGE_WRITE_COMPRESS | \
199 ZIO_STAGE_DVA_THROTTLE | \
200 ZIO_STAGE_DVA_ALLOCATE)
219
220 #define ZIO_FREE_PIPELINE \
221 (ZIO_INTERLOCK_STAGES | \
222 ZIO_STAGE_FREE_BP_INIT | \
223 ZIO_STAGE_DVA_FREE)
224
225 #define ZIO_DDT_FREE_PIPELINE \
226 (ZIO_INTERLOCK_STAGES | \
227 ZIO_STAGE_FREE_BP_INIT | \
228 ZIO_STAGE_ISSUE_ASYNC | \
229 ZIO_STAGE_DDT_FREE)
230
231 #define ZIO_CLAIM_PIPELINE \
232 (ZIO_INTERLOCK_STAGES | \
233 ZIO_STAGE_DVA_CLAIM)
234
235 #define ZIO_IOCTL_PIPELINE \
236 (ZIO_INTERLOCK_STAGES | \
237 ZIO_STAGE_VDEV_IO_START | \
238 ZIO_STAGE_VDEV_IO_ASSESS)
239
240 #define ZIO_BLOCKING_STAGES \
241 (ZIO_STAGE_DVA_ALLOCATE | \
242 ZIO_STAGE_DVA_CLAIM | \
243 ZIO_STAGE_VDEV_IO_START)
244
245 extern void zio_inject_init(void);
246 extern void zio_inject_fini(void);
247
248 #ifdef __cplusplus
249 }
250 #endif
251
252 #endif /* _ZIO_IMPL_H */
|
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 /*
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved.
23 * Use is subject to license terms.
24 */
25
26 /*
27 * Copyright 2015 Nexenta Systems, Inc. All rights reserved.
28 * Copyright (c) 2012, 2015 by Delphix. All rights reserved.
29 */
30
31 #ifndef _ZIO_IMPL_H
32 #define _ZIO_IMPL_H
33
34 #include <sys/zfs_context.h>
35 #include <sys/zio.h>
36
37 #ifdef __cplusplus
38 extern "C" {
39 #endif
40
41 /*
42 * XXX -- Describe ZFS I/O pipeline here. Fill in as needed.
43 *
44 * The ZFS I/O pipeline is comprised of various stages which are defined
45 * in the zio_stage enum below. The individual stages are used to construct
46 * these basic I/O operations: Read, Write, Free, Claim, and Ioctl.
47 *
162 (ZIO_INTERLOCK_STAGES | \
163 ZIO_VDEV_IO_STAGES | \
164 ZIO_STAGE_CHECKSUM_VERIFY)
165
166 #define ZIO_READ_PHYS_PIPELINE \
167 ZIO_READ_COMMON_STAGES
168
169 #define ZIO_READ_PIPELINE \
170 (ZIO_READ_COMMON_STAGES | \
171 ZIO_STAGE_READ_BP_INIT)
172
173 #define ZIO_DDT_CHILD_READ_PIPELINE \
174 ZIO_READ_COMMON_STAGES
175
176 #define ZIO_DDT_READ_PIPELINE \
177 (ZIO_INTERLOCK_STAGES | \
178 ZIO_STAGE_READ_BP_INIT | \
179 ZIO_STAGE_DDT_READ_START | \
180 ZIO_STAGE_DDT_READ_DONE)
181
182 #define ZIO_MOVE_PIPELINE \
183 (ZIO_INTERLOCK_STAGES | \
184 ZIO_VDEV_IO_STAGES | \
185 ZIO_STAGE_ISSUE_ASYNC | \
186 ZIO_STAGE_WRITE_BP_INIT | \
187 ZIO_STAGE_DVA_ALLOCATE)
188
189 #define ZIO_WRITE_COMMON_STAGES \
190 (ZIO_INTERLOCK_STAGES | \
191 ZIO_VDEV_IO_STAGES | \
192 ZIO_STAGE_ISSUE_ASYNC | \
193 ZIO_STAGE_CHECKSUM_GENERATE)
194
195 #define ZIO_WRITE_PHYS_PIPELINE \
196 ZIO_WRITE_COMMON_STAGES
197
198 #define ZIO_REWRITE_PIPELINE \
199 (ZIO_WRITE_COMMON_STAGES | \
200 ZIO_STAGE_WRITE_COMPRESS | \
201 ZIO_STAGE_WRITE_BP_INIT)
202
203 #define ZIO_WRITE_PIPELINE \
204 (ZIO_WRITE_COMMON_STAGES | \
205 ZIO_STAGE_WRITE_BP_INIT | \
206 ZIO_STAGE_WRITE_COMPRESS | \
207 ZIO_STAGE_DVA_THROTTLE | \
208 ZIO_STAGE_DVA_ALLOCATE)
227
228 #define ZIO_FREE_PIPELINE \
229 (ZIO_INTERLOCK_STAGES | \
230 ZIO_STAGE_FREE_BP_INIT | \
231 ZIO_STAGE_DVA_FREE)
232
233 #define ZIO_DDT_FREE_PIPELINE \
234 (ZIO_INTERLOCK_STAGES | \
235 ZIO_STAGE_FREE_BP_INIT | \
236 ZIO_STAGE_ISSUE_ASYNC | \
237 ZIO_STAGE_DDT_FREE)
238
239 #define ZIO_CLAIM_PIPELINE \
240 (ZIO_INTERLOCK_STAGES | \
241 ZIO_STAGE_DVA_CLAIM)
242
243 #define ZIO_IOCTL_PIPELINE \
244 (ZIO_INTERLOCK_STAGES | \
245 ZIO_STAGE_VDEV_IO_START | \
246 ZIO_STAGE_VDEV_IO_ASSESS)
247
248 #define ZIO_TRIM_PIPELINE \
249 (ZIO_INTERLOCK_STAGES | \
250 ZIO_STAGE_ISSUE_ASYNC | \
251 ZIO_STAGE_VDEV_IO_START | \
252 ZIO_STAGE_VDEV_IO_ASSESS)
253
254 #define ZIO_BLOCKING_STAGES \
255 (ZIO_STAGE_DVA_ALLOCATE | \
256 ZIO_STAGE_DVA_CLAIM | \
257 ZIO_STAGE_VDEV_IO_START)
258
259 extern void zio_inject_init(void);
260 extern void zio_inject_fini(void);
261
262 #ifdef __cplusplus
263 }
264 #endif
265
266 #endif /* _ZIO_IMPL_H */
|