Mercurial > illumos > illumos-gate
annotate usr/src/uts/common/fs/zfs/sys/zio_impl.h @ 14070:d4c9f8eba8fa
3836 zio_free() can be processed immediately in the common case
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Adam Leventhal <ahl@delphix.com>
Approved by: Dan McDonald <danmcd@nexenta.com>
author | Matthew Ahrens <mahrens@delphix.com> |
---|---|
date | Wed, 03 Jul 2013 08:13:38 -0800 |
parents | 196932ec9e6a |
children |
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 /* | |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
22 * Copyright 2009 Sun Microsystems, Inc. All rights reserved. |
789 | 23 * Use is subject to license terms. |
24 */ | |
25 | |
13879
4eac7a87eff2
3329 spa_sync() spends 10-20% of its time in spa_free_sync_cb()
George Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
26 /* |
14070
d4c9f8eba8fa
3836 zio_free() can be processed immediately in the common case
Matthew Ahrens <mahrens@delphix.com>
parents:
13887
diff
changeset
|
27 * Copyright (c) 2013 by Delphix. All rights reserved. |
13879
4eac7a87eff2
3329 spa_sync() spends 10-20% of its time in spa_free_sync_cb()
George Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
28 */ |
4eac7a87eff2
3329 spa_sync() spends 10-20% of its time in spa_free_sync_cb()
George Wilson <george.wilson@delphix.com>
parents:
10922
diff
changeset
|
29 |
789 | 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 /* | |
14070
d4c9f8eba8fa
3836 zio_free() can be processed immediately in the common case
Matthew Ahrens <mahrens@delphix.com>
parents:
13887
diff
changeset
|
41 * XXX -- Describe ZFS I/O pipeline here. Fill in as needed. |
13887
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
42 * |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
43 * The ZFS I/O pipeline is comprised of various stages which are defined |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
44 * in the zio_stage enum below. The individual stages are used to construct |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
45 * these basic I/O operations: Read, Write, Free, Claim, and Ioctl. |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
46 * |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
47 * I/O operations: (XXX - provide detail for each of the operations) |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
48 * |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
49 * Read: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
50 * Write: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
51 * Free: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
52 * Claim: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
53 * Ioctl: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
54 * |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
55 * Although the most common pipeline are used by the basic I/O operations |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
56 * above, there are some helper pipelines (one could consider them |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
57 * sub-pipelines) which are used internally by the ZIO module and are |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
58 * explained below: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
59 * |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
60 * Interlock Pipeline: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
61 * The interlock pipeline is the most basic pipeline and is used by all |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
62 * of the I/O operations. The interlock pipeline does not perform any I/O |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
63 * and is used to coordinate the dependencies between I/Os that are being |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
64 * issued (i.e. the parent/child relationship). |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
65 * |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
66 * Vdev child Pipeline: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
67 * The vdev child pipeline is responsible for performing the physical I/O. |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
68 * It is in this pipeline where the I/O are queued and possibly cached. |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
69 * |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
70 * In addition to performing I/O, the pipeline is also responsible for |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
71 * data transformations. The transformations performed are based on the |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
72 * specific properties that user may have selected and modify the |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
73 * behavior of the pipeline. Examples of supported transformations are |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
74 * compression, dedup, and nop writes. Transformations will either modify |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
75 * the data or the pipeline. This list below further describes each of |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
76 * the supported transformations: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
77 * |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
78 * Compression: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
79 * ZFS supports three different flavors of compression -- gzip, lzjb, and |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
80 * zle. Compression occurs as part of the write pipeline and is performed |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
81 * in the ZIO_STAGE_WRITE_BP_INIT stage. |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
82 * |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
83 * Dedup: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
84 * Dedup reads are handled by the ZIO_STAGE_DDT_READ_START and |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
85 * ZIO_STAGE_DDT_READ_DONE stages. These stages are added to an existing |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
86 * read pipeline if the dedup bit is set on the block pointer. |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
87 * Writing a dedup block is performed by the ZIO_STAGE_DDT_WRITE stage |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
88 * and added to a write pipeline if a user has enabled dedup on that |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
89 * particular dataset. |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
90 * |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
91 * NOP Write: |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
92 * The NOP write feature is performed by the ZIO_STAGE_NOP_WRITE stage |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
93 * and is added to an existing write pipeline if a crypographically |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
94 * secure checksum (i.e. SHA256) is enabled and compression is turned on. |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
95 * The NOP write stage will compare the checksums of the current data |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
96 * on-disk (level-0 blocks only) and the data that is currently being written. |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
97 * If the checksum values are identical then the pipeline is converted to |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
98 * an interlock pipeline skipping block allocation and bypassing the |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
99 * physical I/O. The nop write feature can handle writes in either |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
100 * syncing or open context (i.e. zil writes) and as a result is mutually |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
101 * exclusive with dedup. |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
102 */ |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
103 |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
104 /* |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
105 * zio pipeline stage definitions |
789 | 106 */ |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
107 enum zio_stage { |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
108 ZIO_STAGE_OPEN = 1 << 0, /* RWFCI */ |
7754
b80e4842ad54
6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
5688
diff
changeset
|
109 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
110 ZIO_STAGE_READ_BP_INIT = 1 << 1, /* R---- */ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
111 ZIO_STAGE_FREE_BP_INIT = 1 << 2, /* --F-- */ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
112 ZIO_STAGE_ISSUE_ASYNC = 1 << 3, /* RWF-- */ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
113 ZIO_STAGE_WRITE_BP_INIT = 1 << 4, /* -W--- */ |
789 | 114 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
115 ZIO_STAGE_CHECKSUM_GENERATE = 1 << 5, /* -W--- */ |
7754
b80e4842ad54
6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
5688
diff
changeset
|
116 |
13887
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
117 ZIO_STAGE_NOP_WRITE = 1 << 6, /* -W--- */ |
789 | 118 |
13887
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
119 ZIO_STAGE_DDT_READ_START = 1 << 7, /* R---- */ |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
120 ZIO_STAGE_DDT_READ_DONE = 1 << 8, /* R---- */ |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
121 ZIO_STAGE_DDT_WRITE = 1 << 9, /* -W--- */ |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
122 ZIO_STAGE_DDT_FREE = 1 << 10, /* --F-- */ |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
123 |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
124 ZIO_STAGE_GANG_ASSEMBLE = 1 << 11, /* RWFC- */ |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
125 ZIO_STAGE_GANG_ISSUE = 1 << 12, /* RWFC- */ |
789 | 126 |
13887
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
127 ZIO_STAGE_DVA_ALLOCATE = 1 << 13, /* -W--- */ |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
128 ZIO_STAGE_DVA_FREE = 1 << 14, /* --F-- */ |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
129 ZIO_STAGE_DVA_CLAIM = 1 << 15, /* ---C- */ |
789 | 130 |
13887
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
131 ZIO_STAGE_READY = 1 << 16, /* RWFCI */ |
789 | 132 |
13887
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
133 ZIO_STAGE_VDEV_IO_START = 1 << 17, /* RW--I */ |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
134 ZIO_STAGE_VDEV_IO_DONE = 1 << 18, /* RW--I */ |
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
135 ZIO_STAGE_VDEV_IO_ASSESS = 1 << 19, /* RW--I */ |
789 | 136 |
13887
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
137 ZIO_STAGE_CHECKSUM_VERIFY = 1 << 20, /* R---- */ |
789 | 138 |
13887
196932ec9e6a
3236 zio nop-write
George Wilson <george.wilson@delphix.com>
parents:
13879
diff
changeset
|
139 ZIO_STAGE_DONE = 1 << 21 /* RWFCI */ |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
140 }; |
789 | 141 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
142 #define ZIO_INTERLOCK_STAGES \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
143 (ZIO_STAGE_READY | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
144 ZIO_STAGE_DONE) |
789 | 145 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
146 #define ZIO_INTERLOCK_PIPELINE \ |
7754
b80e4842ad54
6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
5688
diff
changeset
|
147 ZIO_INTERLOCK_STAGES |
b80e4842ad54
6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
5688
diff
changeset
|
148 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
149 #define ZIO_VDEV_IO_STAGES \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
150 (ZIO_STAGE_VDEV_IO_START | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
151 ZIO_STAGE_VDEV_IO_DONE | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
152 ZIO_STAGE_VDEV_IO_ASSESS) |
789 | 153 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
154 #define ZIO_VDEV_CHILD_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
155 (ZIO_VDEV_IO_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
156 ZIO_STAGE_DONE) |
7754
b80e4842ad54
6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
5688
diff
changeset
|
157 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
158 #define ZIO_READ_COMMON_STAGES \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
159 (ZIO_INTERLOCK_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
160 ZIO_VDEV_IO_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
161 ZIO_STAGE_CHECKSUM_VERIFY) |
789 | 162 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
163 #define ZIO_READ_PHYS_PIPELINE \ |
7754
b80e4842ad54
6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
5688
diff
changeset
|
164 ZIO_READ_COMMON_STAGES |
5329 | 165 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
166 #define ZIO_READ_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
167 (ZIO_READ_COMMON_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
168 ZIO_STAGE_READ_BP_INIT) |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
169 |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
170 #define ZIO_DDT_CHILD_READ_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
171 ZIO_READ_COMMON_STAGES |
789 | 172 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
173 #define ZIO_DDT_READ_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
174 (ZIO_INTERLOCK_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
175 ZIO_STAGE_READ_BP_INIT | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
176 ZIO_STAGE_DDT_READ_START | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
177 ZIO_STAGE_DDT_READ_DONE) |
5530 | 178 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
179 #define ZIO_WRITE_COMMON_STAGES \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
180 (ZIO_INTERLOCK_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
181 ZIO_VDEV_IO_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
182 ZIO_STAGE_ISSUE_ASYNC | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
183 ZIO_STAGE_CHECKSUM_GENERATE) |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
184 |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
185 #define ZIO_WRITE_PHYS_PIPELINE \ |
5530 | 186 ZIO_WRITE_COMMON_STAGES |
789 | 187 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
188 #define ZIO_REWRITE_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
189 (ZIO_WRITE_COMMON_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
190 ZIO_STAGE_WRITE_BP_INIT) |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
191 |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
192 #define ZIO_WRITE_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
193 (ZIO_WRITE_COMMON_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
194 ZIO_STAGE_WRITE_BP_INIT | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
195 ZIO_STAGE_DVA_ALLOCATE) |
7754
b80e4842ad54
6754011 SPA 3.0: lock breakup, i/o pipeline refactoring, device failure handling
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
5688
diff
changeset
|
196 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
197 #define ZIO_DDT_CHILD_WRITE_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
198 (ZIO_INTERLOCK_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
199 ZIO_VDEV_IO_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
200 ZIO_STAGE_DVA_ALLOCATE) |
789 | 201 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
202 #define ZIO_DDT_WRITE_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
203 (ZIO_INTERLOCK_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
204 ZIO_STAGE_ISSUE_ASYNC | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
205 ZIO_STAGE_WRITE_BP_INIT | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
206 ZIO_STAGE_CHECKSUM_GENERATE | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
207 ZIO_STAGE_DDT_WRITE) |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
208 |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
209 #define ZIO_GANG_STAGES \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
210 (ZIO_STAGE_GANG_ASSEMBLE | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
211 ZIO_STAGE_GANG_ISSUE) |
5530 | 212 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
213 #define ZIO_FREE_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
214 (ZIO_INTERLOCK_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
215 ZIO_STAGE_FREE_BP_INIT | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
216 ZIO_STAGE_DVA_FREE) |
5530 | 217 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
218 #define ZIO_DDT_FREE_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
219 (ZIO_INTERLOCK_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
220 ZIO_STAGE_FREE_BP_INIT | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
221 ZIO_STAGE_ISSUE_ASYNC | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
222 ZIO_STAGE_DDT_FREE) |
789 | 223 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
224 #define ZIO_CLAIM_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
225 (ZIO_INTERLOCK_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
226 ZIO_STAGE_DVA_CLAIM) |
5530 | 227 |
10922
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
228 #define ZIO_IOCTL_PIPELINE \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
229 (ZIO_INTERLOCK_STAGES | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
230 ZIO_STAGE_VDEV_IO_START | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
231 ZIO_STAGE_VDEV_IO_ASSESS) |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
232 |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
233 #define ZIO_BLOCKING_STAGES \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
234 (ZIO_STAGE_DVA_ALLOCATE | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
235 ZIO_STAGE_DVA_CLAIM | \ |
e2081f502306
PSARC 2009/571 ZFS Deduplication Properties
Jeff Bonwick <Jeff.Bonwick@Sun.COM>
parents:
7754
diff
changeset
|
236 ZIO_STAGE_VDEV_IO_START) |
789 | 237 |
1544 | 238 extern void zio_inject_init(void); |
239 extern void zio_inject_fini(void); | |
240 | |
789 | 241 #ifdef __cplusplus |
242 } | |
243 #endif | |
244 | |
245 #endif /* _ZIO_IMPL_H */ |