Deleted Added
full compact
zio.h (307265) zio.h (307277)
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

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

170 */
171 ZIO_FLAG_CANFAIL = 1 << 7, /* must be first for INHERIT */
172 ZIO_FLAG_SPECULATIVE = 1 << 8,
173 ZIO_FLAG_CONFIG_WRITER = 1 << 9,
174 ZIO_FLAG_DONT_RETRY = 1 << 10,
175 ZIO_FLAG_DONT_CACHE = 1 << 11,
176 ZIO_FLAG_NODATA = 1 << 12,
177 ZIO_FLAG_INDUCE_DAMAGE = 1 << 13,
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

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

170 */
171 ZIO_FLAG_CANFAIL = 1 << 7, /* must be first for INHERIT */
172 ZIO_FLAG_SPECULATIVE = 1 << 8,
173 ZIO_FLAG_CONFIG_WRITER = 1 << 9,
174 ZIO_FLAG_DONT_RETRY = 1 << 10,
175 ZIO_FLAG_DONT_CACHE = 1 << 11,
176 ZIO_FLAG_NODATA = 1 << 12,
177 ZIO_FLAG_INDUCE_DAMAGE = 1 << 13,
178 ZIO_FLAG_IO_ALLOCATING = 1 << 14,
178
179#define ZIO_FLAG_DDT_INHERIT (ZIO_FLAG_IO_RETRY - 1)
180#define ZIO_FLAG_GANG_INHERIT (ZIO_FLAG_IO_RETRY - 1)
181
182 /*
183 * Flags inherited by vdev children.
184 */
179
180#define ZIO_FLAG_DDT_INHERIT (ZIO_FLAG_IO_RETRY - 1)
181#define ZIO_FLAG_GANG_INHERIT (ZIO_FLAG_IO_RETRY - 1)
182
183 /*
184 * Flags inherited by vdev children.
185 */
185 ZIO_FLAG_IO_RETRY = 1 << 14, /* must be first for INHERIT */
186 ZIO_FLAG_PROBE = 1 << 15,
187 ZIO_FLAG_TRYHARD = 1 << 16,
188 ZIO_FLAG_OPTIONAL = 1 << 17,
186 ZIO_FLAG_IO_RETRY = 1 << 15, /* must be first for INHERIT */
187 ZIO_FLAG_PROBE = 1 << 16,
188 ZIO_FLAG_TRYHARD = 1 << 17,
189 ZIO_FLAG_OPTIONAL = 1 << 18,
189
190#define ZIO_FLAG_VDEV_INHERIT (ZIO_FLAG_DONT_QUEUE - 1)
191
192 /*
193 * Flags not inherited by any children.
194 */
190
191#define ZIO_FLAG_VDEV_INHERIT (ZIO_FLAG_DONT_QUEUE - 1)
192
193 /*
194 * Flags not inherited by any children.
195 */
195 ZIO_FLAG_DONT_QUEUE = 1 << 18, /* must be first for INHERIT */
196 ZIO_FLAG_DONT_PROPAGATE = 1 << 19,
197 ZIO_FLAG_IO_BYPASS = 1 << 20,
198 ZIO_FLAG_IO_REWRITE = 1 << 21,
199 ZIO_FLAG_RAW = 1 << 22,
200 ZIO_FLAG_GANG_CHILD = 1 << 23,
201 ZIO_FLAG_DDT_CHILD = 1 << 24,
202 ZIO_FLAG_GODFATHER = 1 << 25,
203 ZIO_FLAG_NOPWRITE = 1 << 26,
204 ZIO_FLAG_REEXECUTED = 1 << 27,
205 ZIO_FLAG_DELEGATED = 1 << 28,
196 ZIO_FLAG_DONT_QUEUE = 1 << 19, /* must be first for INHERIT */
197 ZIO_FLAG_DONT_PROPAGATE = 1 << 20,
198 ZIO_FLAG_IO_BYPASS = 1 << 21,
199 ZIO_FLAG_IO_REWRITE = 1 << 22,
200 ZIO_FLAG_RAW = 1 << 23,
201 ZIO_FLAG_GANG_CHILD = 1 << 24,
202 ZIO_FLAG_DDT_CHILD = 1 << 25,
203 ZIO_FLAG_GODFATHER = 1 << 26,
204 ZIO_FLAG_NOPWRITE = 1 << 27,
205 ZIO_FLAG_REEXECUTED = 1 << 28,
206 ZIO_FLAG_DELEGATED = 1 << 29,
206};
207
208#define ZIO_FLAG_MUSTSUCCEED 0
209
210#define ZIO_DDT_CHILD_FLAGS(zio) \
211 (((zio)->io_flags & ZIO_FLAG_DDT_INHERIT) | \
212 ZIO_FLAG_DDT_CHILD | ZIO_FLAG_CANFAIL)
213

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

238 * fragmentation. Those doesn't collide with any errno values as they
239 * are greater than ELAST.
240 */
241#define ECKSUM 122
242#define EFRAGS 123
243
244typedef void zio_done_func_t(zio_t *zio);
245
207};
208
209#define ZIO_FLAG_MUSTSUCCEED 0
210
211#define ZIO_DDT_CHILD_FLAGS(zio) \
212 (((zio)->io_flags & ZIO_FLAG_DDT_INHERIT) | \
213 ZIO_FLAG_DDT_CHILD | ZIO_FLAG_CANFAIL)
214

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

239 * fragmentation. Those doesn't collide with any errno values as they
240 * are greater than ELAST.
241 */
242#define ECKSUM 122
243#define EFRAGS 123
244
245typedef void zio_done_func_t(zio_t *zio);
246
247extern boolean_t zio_dva_throttle_enabled;
246extern const char *zio_type_name[ZIO_TYPES];
247
248/*
249 * A bookmark is a four-tuple <objset, object, level, blkid> that uniquely
250 * identifies any block in the pool. By convention, the meta-objset (MOS)
251 * is objset 0, and the meta-dnode is object 0. This covers all blocks
252 * except root blocks and ZIL blocks, which are defined as follows:
253 *

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

425 uint8_t io_state[ZIO_WAIT_TYPES];
426 uint64_t io_txg;
427 spa_t *io_spa;
428 blkptr_t *io_bp;
429 blkptr_t *io_bp_override;
430 blkptr_t io_bp_copy;
431 list_t io_parent_list;
432 list_t io_child_list;
248extern const char *zio_type_name[ZIO_TYPES];
249
250/*
251 * A bookmark is a four-tuple <objset, object, level, blkid> that uniquely
252 * identifies any block in the pool. By convention, the meta-objset (MOS)
253 * is objset 0, and the meta-dnode is object 0. This covers all blocks
254 * except root blocks and ZIL blocks, which are defined as follows:
255 *

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

427 uint8_t io_state[ZIO_WAIT_TYPES];
428 uint64_t io_txg;
429 spa_t *io_spa;
430 blkptr_t *io_bp;
431 blkptr_t *io_bp_override;
432 blkptr_t io_bp_copy;
433 list_t io_parent_list;
434 list_t io_child_list;
433 zio_link_t *io_walk_link;
434 zio_t *io_logical;
435 zio_transform_t *io_transform_stack;
436
437 /* Callback info */
438 zio_done_func_t *io_ready;
439 zio_done_func_t *io_children_ready;
440 zio_done_func_t *io_physdone;
441 zio_done_func_t *io_done;

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

451
452 /* Stuff for the vdev stack */
453 vdev_t *io_vd;
454 void *io_vsd;
455 const zio_vsd_ops_t *io_vsd_ops;
456
457 uint64_t io_offset;
458 hrtime_t io_timestamp;
435 zio_t *io_logical;
436 zio_transform_t *io_transform_stack;
437
438 /* Callback info */
439 zio_done_func_t *io_ready;
440 zio_done_func_t *io_children_ready;
441 zio_done_func_t *io_physdone;
442 zio_done_func_t *io_done;

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

452
453 /* Stuff for the vdev stack */
454 vdev_t *io_vd;
455 void *io_vsd;
456 const zio_vsd_ops_t *io_vsd_ops;
457
458 uint64_t io_offset;
459 hrtime_t io_timestamp;
460 hrtime_t io_queued_timestamp;
459 hrtime_t io_target_timestamp;
460 avl_node_t io_queue_node;
461 avl_node_t io_offset_node;
461 hrtime_t io_target_timestamp;
462 avl_node_t io_queue_node;
463 avl_node_t io_offset_node;
464 avl_node_t io_alloc_node;
462
463 /* Internal pipeline state */
464 enum zio_flag io_flags;
465 enum zio_stage io_stage;
466 enum zio_stage io_pipeline;
467 enum zio_flag io_orig_flags;
468 enum zio_stage io_orig_stage;
469 enum zio_stage io_orig_pipeline;
465
466 /* Internal pipeline state */
467 enum zio_flag io_flags;
468 enum zio_stage io_stage;
469 enum zio_stage io_pipeline;
470 enum zio_flag io_orig_flags;
471 enum zio_stage io_orig_stage;
472 enum zio_stage io_orig_pipeline;
473 enum zio_stage io_pipeline_trace;
470 int io_error;
471 int io_child_error[ZIO_CHILD_TYPES];
472 uint64_t io_children[ZIO_CHILD_TYPES][ZIO_WAIT_TYPES];
473 uint64_t io_child_count;
474 uint64_t io_phys_children;
475 uint64_t io_parent_count;
476 uint64_t *io_stall;
477 zio_t *io_gang_leader;

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

487
488 /* Taskq dispatching state */
489 taskq_ent_t io_tqent;
490
491 avl_node_t io_trim_node;
492 list_node_t io_trim_link;
493};
494
474 int io_error;
475 int io_child_error[ZIO_CHILD_TYPES];
476 uint64_t io_children[ZIO_CHILD_TYPES][ZIO_WAIT_TYPES];
477 uint64_t io_child_count;
478 uint64_t io_phys_children;
479 uint64_t io_parent_count;
480 uint64_t *io_stall;
481 zio_t *io_gang_leader;

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

491
492 /* Taskq dispatching state */
493 taskq_ent_t io_tqent;
494
495 avl_node_t io_trim_node;
496 list_node_t io_trim_link;
497};
498
499extern int zio_timestamp_compare(const void *, const void *);
500
495extern zio_t *zio_null(zio_t *pio, spa_t *spa, vdev_t *vd,
496 zio_done_func_t *done, void *priv, enum zio_flag flags);
497
498extern zio_t *zio_root(spa_t *spa,
499 zio_done_func_t *done, void *priv, enum zio_flag flags);
500
501extern zio_t *zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, void *data,
502 uint64_t size, zio_done_func_t *done, void *priv,

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

549
550extern int zio_wait(zio_t *zio);
551extern void zio_nowait(zio_t *zio);
552extern void zio_execute(zio_t *zio);
553extern void zio_interrupt(zio_t *zio);
554extern void zio_delay_init(zio_t *zio);
555extern void zio_delay_interrupt(zio_t *zio);
556
501extern zio_t *zio_null(zio_t *pio, spa_t *spa, vdev_t *vd,
502 zio_done_func_t *done, void *priv, enum zio_flag flags);
503
504extern zio_t *zio_root(spa_t *spa,
505 zio_done_func_t *done, void *priv, enum zio_flag flags);
506
507extern zio_t *zio_read(zio_t *pio, spa_t *spa, const blkptr_t *bp, void *data,
508 uint64_t size, zio_done_func_t *done, void *priv,

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

555
556extern int zio_wait(zio_t *zio);
557extern void zio_nowait(zio_t *zio);
558extern void zio_execute(zio_t *zio);
559extern void zio_interrupt(zio_t *zio);
560extern void zio_delay_init(zio_t *zio);
561extern void zio_delay_interrupt(zio_t *zio);
562
557extern zio_t *zio_walk_parents(zio_t *cio);
558extern zio_t *zio_walk_children(zio_t *pio);
563extern zio_t *zio_walk_parents(zio_t *cio, zio_link_t **);
564extern zio_t *zio_walk_children(zio_t *pio, zio_link_t **);
559extern zio_t *zio_unique_parent(zio_t *cio);
560extern void zio_add_child(zio_t *pio, zio_t *cio);
561
562extern void *zio_buf_alloc(size_t size);
563extern void zio_buf_free(void *buf, size_t size);
564extern void *zio_data_buf_alloc(size_t size);
565extern void zio_data_buf_free(void *buf, size_t size);
566

--- 86 unchanged lines hidden ---
565extern zio_t *zio_unique_parent(zio_t *cio);
566extern void zio_add_child(zio_t *pio, zio_t *cio);
567
568extern void *zio_buf_alloc(size_t size);
569extern void zio_buf_free(void *buf, size_t size);
570extern void *zio_data_buf_alloc(size_t size);
571extern void zio_data_buf_free(void *buf, size_t size);
572

--- 86 unchanged lines hidden ---