cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * CDDL HEADER START
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * The contents of this file are subject to the terms of the
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * Common Development and Distribution License (the "License").
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * You may not use this file except in compliance with the License.
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * or http://www.opensolaris.org/os/licensing.
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * See the License for the specific language governing permissions
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * and limitations under the License.
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * When distributing Covered Code, include this CDDL HEADER in each
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * If applicable, add the following below this CDDL HEADER, with the
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * fields enclosed by brackets "[]" replaced with your own identifying
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * information: Portions Copyright [yyyy] [name of copyright owner]
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * CDDL HEADER END
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * Copyright (c) 2010, Oracle and/or its affiliates. All rights reserved.
732885fca09e11183dd0ea69aaaab5588fb7dbffMatthew Ahrens * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * This is the bonus buffer for the dead lists. The object's
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * contents is an array of bpo_entries blkptr_t's, representing
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens * a total of bpo_bytes physical space.
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrenstypedef int bpobj_itor_t(void *arg, const blkptr_t *bp, dmu_tx_t *tx);
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrensuint64_t bpobj_alloc(objset_t *mos, int blocksize, dmu_tx_t *tx);
f17457368189aa911f774c38c1f21875a568bdcaMatthew Ahrensuint64_t bpobj_alloc_empty(objset_t *os, int blocksize, dmu_tx_t *tx);
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrensvoid bpobj_free(objset_t *os, uint64_t obj, dmu_tx_t *tx);
f17457368189aa911f774c38c1f21875a568bdcaMatthew Ahrensvoid bpobj_decr_empty(objset_t *os, dmu_tx_t *tx);
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrensint bpobj_open(bpobj_t *bpo, objset_t *mos, uint64_t object);
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrensint bpobj_iterate(bpobj_t *bpo, bpobj_itor_t func, void *arg, dmu_tx_t *tx);
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrensint bpobj_iterate_nofree(bpobj_t *bpo, bpobj_itor_t func, void *, dmu_tx_t *);
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrensvoid bpobj_enqueue_subobj(bpobj_t *bpo, uint64_t subobj, dmu_tx_t *tx);
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrensvoid bpobj_enqueue(bpobj_t *bpo, const blkptr_t *bp, dmu_tx_t *tx);
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens uint64_t *usedp, uint64_t *compp, uint64_t *uncompp);
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrensint bpobj_space_range(bpobj_t *bpo, uint64_t mintxg, uint64_t maxtxg,
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens uint64_t *usedp, uint64_t *compp, uint64_t *uncompp);
cde58dbc6a23d4d38db7c8866312be83221c765fMatthew Ahrens#endif /* _SYS_BPOBJ_H */