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
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 (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2013 by Delphix. All rights reserved.
24 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25 */
26
27 #ifndef _SYS_SPA_IMPL_H
28 #define _SYS_SPA_IMPL_H
29
30 #include <sys/spa.h>
31 #include <sys/vdev.h>
32 #include <sys/metaslab.h>
33 #include <sys/dmu.h>
34 #include <sys/dsl_pool.h>
35 #include <sys/uberblock_impl.h>
36 #include <sys/zfs_context.h>
37 #include <sys/avl.h>
38 #include <sys/refcount.h>
39 #include <sys/bplist.h>
40 #include <sys/bpobj.h>
41
42 #ifdef __cplusplus
43 extern "C" {
44 #endif
140 uint64_t spa_freeze_txg; /* freeze pool at this txg */
141 uint64_t spa_load_max_txg; /* best initial ub_txg */
142 uint64_t spa_claim_max_txg; /* highest claimed birth txg */
143 timespec_t spa_loaded_ts; /* 1st successful open time */
144 objset_t *spa_meta_objset; /* copy of dp->dp_meta_objset */
145 txg_list_t spa_vdev_txg_list; /* per-txg dirty vdev list */
146 vdev_t *spa_root_vdev; /* top-level vdev container */
147 uint64_t spa_config_guid; /* config pool guid */
148 uint64_t spa_load_guid; /* spa_load initialized guid */
149 uint64_t spa_last_synced_guid; /* last synced guid */
150 list_t spa_config_dirty_list; /* vdevs with dirty config */
151 list_t spa_state_dirty_list; /* vdevs with dirty state */
152 spa_aux_vdev_t spa_spares; /* hot spares */
153 spa_aux_vdev_t spa_l2cache; /* L2ARC cache devices */
154 nvlist_t *spa_label_features; /* Features for reading MOS */
155 uint64_t spa_config_object; /* MOS object for pool config */
156 uint64_t spa_config_generation; /* config generation number */
157 uint64_t spa_syncing_txg; /* txg currently syncing */
158 bpobj_t spa_deferred_bpobj; /* deferred-free bplist */
159 bplist_t spa_free_bplist[TXG_SIZE]; /* bplist of stuff to free */
160 uberblock_t spa_ubsync; /* last synced uberblock */
161 uberblock_t spa_uberblock; /* current uberblock */
162 boolean_t spa_extreme_rewind; /* rewind past deferred frees */
163 uint64_t spa_last_io; /* lbolt of last non-scan I/O */
164 kmutex_t spa_scrub_lock; /* resilver/scrub lock */
165 uint64_t spa_scrub_inflight; /* in-flight scrub I/Os */
166 kcondvar_t spa_scrub_io_cv; /* scrub I/O completion */
167 uint8_t spa_scrub_active; /* active or suspended? */
168 uint8_t spa_scrub_type; /* type of scrub we're doing */
169 uint8_t spa_scrub_finished; /* indicator to rotate logs */
170 uint8_t spa_scrub_started; /* started since last boot */
171 uint8_t spa_scrub_reopen; /* scrub doing vdev_reopen */
172 uint64_t spa_scan_pass_start; /* start time per pass/reboot */
173 uint64_t spa_scan_pass_exam; /* examined bytes per pass */
174 kmutex_t spa_async_lock; /* protect async state */
175 kthread_t *spa_async_thread; /* thread doing async task */
176 int spa_async_suspended; /* async tasks suspended */
177 kcondvar_t spa_async_cv; /* wait for thread_exit() */
178 uint16_t spa_async_tasks; /* async task mask */
179 char *spa_root; /* alternate root directory */
|
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
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 (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2013 by Delphix. All rights reserved.
24 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
25 * Copyright 2013 Saso Kiselkov. All rights reserved.
26 */
27
28 #ifndef _SYS_SPA_IMPL_H
29 #define _SYS_SPA_IMPL_H
30
31 #include <sys/spa.h>
32 #include <sys/vdev.h>
33 #include <sys/metaslab.h>
34 #include <sys/dmu.h>
35 #include <sys/dsl_pool.h>
36 #include <sys/uberblock_impl.h>
37 #include <sys/zfs_context.h>
38 #include <sys/avl.h>
39 #include <sys/refcount.h>
40 #include <sys/bplist.h>
41 #include <sys/bpobj.h>
42
43 #ifdef __cplusplus
44 extern "C" {
45 #endif
141 uint64_t spa_freeze_txg; /* freeze pool at this txg */
142 uint64_t spa_load_max_txg; /* best initial ub_txg */
143 uint64_t spa_claim_max_txg; /* highest claimed birth txg */
144 timespec_t spa_loaded_ts; /* 1st successful open time */
145 objset_t *spa_meta_objset; /* copy of dp->dp_meta_objset */
146 txg_list_t spa_vdev_txg_list; /* per-txg dirty vdev list */
147 vdev_t *spa_root_vdev; /* top-level vdev container */
148 uint64_t spa_config_guid; /* config pool guid */
149 uint64_t spa_load_guid; /* spa_load initialized guid */
150 uint64_t spa_last_synced_guid; /* last synced guid */
151 list_t spa_config_dirty_list; /* vdevs with dirty config */
152 list_t spa_state_dirty_list; /* vdevs with dirty state */
153 spa_aux_vdev_t spa_spares; /* hot spares */
154 spa_aux_vdev_t spa_l2cache; /* L2ARC cache devices */
155 nvlist_t *spa_label_features; /* Features for reading MOS */
156 uint64_t spa_config_object; /* MOS object for pool config */
157 uint64_t spa_config_generation; /* config generation number */
158 uint64_t spa_syncing_txg; /* txg currently syncing */
159 bpobj_t spa_deferred_bpobj; /* deferred-free bplist */
160 bplist_t spa_free_bplist[TXG_SIZE]; /* bplist of stuff to free */
161 zio_cksum_salt_t spa_cksum_salt; /* secret salt for cksum */
162 uint64_t spa_cksum_salt_obj; /* persistent salt object */
163 /* checksum context templates */
164 kmutex_t spa_cksum_tmpls_lock;
165 void *spa_cksum_tmpls[ZIO_CHECKSUM_FUNCTIONS];
166 uberblock_t spa_ubsync; /* last synced uberblock */
167 uberblock_t spa_uberblock; /* current uberblock */
168 boolean_t spa_extreme_rewind; /* rewind past deferred frees */
169 uint64_t spa_last_io; /* lbolt of last non-scan I/O */
170 kmutex_t spa_scrub_lock; /* resilver/scrub lock */
171 uint64_t spa_scrub_inflight; /* in-flight scrub I/Os */
172 kcondvar_t spa_scrub_io_cv; /* scrub I/O completion */
173 uint8_t spa_scrub_active; /* active or suspended? */
174 uint8_t spa_scrub_type; /* type of scrub we're doing */
175 uint8_t spa_scrub_finished; /* indicator to rotate logs */
176 uint8_t spa_scrub_started; /* started since last boot */
177 uint8_t spa_scrub_reopen; /* scrub doing vdev_reopen */
178 uint64_t spa_scan_pass_start; /* start time per pass/reboot */
179 uint64_t spa_scan_pass_exam; /* examined bytes per pass */
180 kmutex_t spa_async_lock; /* protect async state */
181 kthread_t *spa_async_thread; /* thread doing async task */
182 int spa_async_suspended; /* async tasks suspended */
183 kcondvar_t spa_async_cv; /* wait for thread_exit() */
184 uint16_t spa_async_tasks; /* async task mask */
185 char *spa_root; /* alternate root directory */
|