dsl_pool.h revision 088f389458728c464569a5506b58070254fa4f7d
fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER START
fa9e4066f08beec538e775443c5be79dd423fcabahrens * The contents of this file are subject to the terms of the
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock * Common Development and Distribution License (the "License").
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrock * You may not use this file except in compliance with the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
fa9e4066f08beec538e775443c5be79dd423fcabahrens * See the License for the specific language governing permissions
fa9e4066f08beec538e775443c5be79dd423fcabahrens * and limitations under the License.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * When distributing Covered Code, include this CDDL HEADER in each
fa9e4066f08beec538e775443c5be79dd423fcabahrens * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * If applicable, add the following below this CDDL HEADER, with the
fa9e4066f08beec538e775443c5be79dd423fcabahrens * fields enclosed by brackets "[]" replaced with your own identifying
fa9e4066f08beec538e775443c5be79dd423fcabahrens * information: Portions Copyright [yyyy] [name of copyright owner]
fa9e4066f08beec538e775443c5be79dd423fcabahrens * CDDL HEADER END
1ab7f2ded02e7a1bc3c73516eb27efa79bf2a2ffmaybee * Copyright 2008 Sun Microsystems, Inc. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Use is subject to license terms.
fa9e4066f08beec538e775443c5be79dd423fcabahrens#pragma ident "%Z%%M% %I% %E% SMI"
fa9e4066f08beec538e775443c5be79dd423fcabahrensextern "C" {
fa9e4066f08beec538e775443c5be79dd423fcabahrenstypedef struct dsl_pool {
fa9e4066f08beec538e775443c5be79dd423fcabahrens /* Immutable */
fa9e4066f08beec538e775443c5be79dd423fcabahrens /* No lock needed - sync context only */
1ab7f2ded02e7a1bc3c73516eb27efa79bf2a2ffmaybee /* Uses dp_lock */
088f389458728c464569a5506b58070254fa4f7dahrens kmutex_t dp_scrub_cancel_lock; /* protects dp_scrub_restart */
fa9e4066f08beec538e775443c5be79dd423fcabahrens /* Has its own locking */
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Protects administrative changes (properties, namespace)
fa9e4066f08beec538e775443c5be79dd423fcabahrens * It is only held for write in syncing context. Therefore
fa9e4066f08beec538e775443c5be79dd423fcabahrens * syncing context does not need to ever have it for read, since
fa9e4066f08beec538e775443c5be79dd423fcabahrens * nobody else could possibly have it for write.
ea8dc4b6d2251b437950c0056bc626b311c73c27eschrockint dsl_pool_open(spa_t *spa, uint64_t txg, dsl_pool_t **dpp);
fa9e4066f08beec538e775443c5be79dd423fcabahrensdsl_pool_t *dsl_pool_create(spa_t *spa, uint64_t txg);
fa9e4066f08beec538e775443c5be79dd423fcabahrensuint64_t dsl_pool_adjustedsize(dsl_pool_t *dp, boolean_t netfree);
1ab7f2ded02e7a1bc3c73516eb27efa79bf2a2ffmaybeeint dsl_pool_tempreserve_space(dsl_pool_t *dp, uint64_t space, dmu_tx_t *tx);
1ab7f2ded02e7a1bc3c73516eb27efa79bf2a2ffmaybeevoid dsl_pool_tempreserve_clear(dsl_pool_t *dp, int64_t space, dmu_tx_t *tx);
1ab7f2ded02e7a1bc3c73516eb27efa79bf2a2ffmaybeevoid dsl_pool_willuse_space(dsl_pool_t *dp, int64_t space, dmu_tx_t *tx);
088f389458728c464569a5506b58070254fa4f7dahrensint dsl_free(zio_t *pio, dsl_pool_t *dp, uint64_t txg, const blkptr_t *bpp,
088f389458728c464569a5506b58070254fa4f7dahrens zio_done_func_t *done, void *private, uint32_t arc_flags);
088f389458728c464569a5506b58070254fa4f7dahrensvoid dsl_pool_ds_destroyed(struct dsl_dataset *ds, struct dmu_tx *tx);
088f389458728c464569a5506b58070254fa4f7dahrensvoid dsl_pool_ds_snapshotted(struct dsl_dataset *ds, struct dmu_tx *tx);
088f389458728c464569a5506b58070254fa4f7dahrensvoid dsl_pool_create_origin(dsl_pool_t *dp, dmu_tx_t *tx);
088f389458728c464569a5506b58070254fa4f7dahrensvoid dsl_pool_upgrade_clones(dsl_pool_t *dp, dmu_tx_t *tx);
088f389458728c464569a5506b58070254fa4f7dahrensvoid dsl_pool_scrub_sync(dsl_pool_t *dp, dmu_tx_t *tx);
fa9e4066f08beec538e775443c5be79dd423fcabahrens#endif /* _SYS_DSL_POOL_H */