spa_impl.h revision f7170741490edba9d1d9c697c177c887172bc741
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * CDDL HEADER START
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * The contents of this file are subject to the terms of the
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * Common Development and Distribution License (the "License").
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * You may not use this file except in compliance with the License.
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * or http://www.opensolaris.org/os/licensing.
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * See the License for the specific language governing permissions
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * and limitations under the License.
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * When distributing Covered Code, include this CDDL HEADER in each
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * If applicable, add the following below this CDDL HEADER, with the
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * fields enclosed by brackets "[]" replaced with your own identifying
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * information: Portions Copyright [yyyy] [name of copyright owner]
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * CDDL HEADER END
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * Copyright (c) 2012 by Delphix. All rights reserved.
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden uint64_t sh_pool_create_len; /* ending offset of zpool create */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden uint64_t sh_phys_max_off; /* physical EOF */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden uint64_t sh_records_lost; /* num of records overwritten */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden uint64_t sav_object; /* MOS object for device list */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden nvlist_t *sav_config; /* cached device config */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden boolean_t sav_sync; /* sync the device list */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden nvlist_t **sav_pending; /* pending device additions */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden uint_t sav_npending; /* # pending devices */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * State machine for the zpool-poolname process. The states transitions
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * are done as follows:
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * From To Routine
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * PROC_NONE -> PROC_CREATED spa_activate()
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * PROC_CREATED -> PROC_ACTIVE spa_thread()
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * PROC_ACTIVE -> PROC_DEACTIVATE spa_deactivate()
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * PROC_DEACTIVATE -> PROC_GONE spa_thread()
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden * PROC_GONE -> PROC_NONE spa_deactivate()
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden SPA_PROC_NONE, /* spa_proc = &p0, no process created */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden SPA_PROC_CREATED, /* spa_activate() has proc, is waiting */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden SPA_PROC_ACTIVE, /* taskqs created, spa_proc set */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden SPA_PROC_DEACTIVATE, /* spa_deactivate() requests process exit */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Siden SPA_PROC_GONE /* spa_thread() is exiting, spa_proc = &p0 */
69a119caa6570c7077699161b7c28b6ee9f8b0f4Christopher Sidentypedef struct spa_taskqs {
} spa_taskqs_t;
struct spa {
extern const char *spa_config_path;
#ifdef __cplusplus