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
0a586cea3ceec7e5e50e7e54c745082a7a333ac2Mark Shellenbaum * Copyright 2010 Sun Microsystems, Inc. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrens * Use is subject to license terms.
0c779ad424a92a84d1e07d47cab7f8009189202bMatthew Ahrens * Copyright (c) 2012, 2015 by Delphix. All rights reserved.
fa9e4066f08beec538e775443c5be79dd423fcabahrensextern "C" {
fa9e4066f08beec538e775443c5be79dd423fcabahrens * No synchronization is needed because a tx can only be handled
fa9e4066f08beec538e775443c5be79dd423fcabahrens * by one thread.
69962b5647e4a8b9b14998733b765925381b727eMatthew Ahrens /* list of dmu_tx_callback_t on this dmu_tx */
69962b5647e4a8b9b14998733b765925381b727eMatthew Ahrens /* placeholder for syncing context, doesn't need specific holds */
69962b5647e4a8b9b14998733b765925381b727eMatthew Ahrens /* has this transaction already been delayed? */
69962b5647e4a8b9b14998733b765925381b727eMatthew Ahrens /* time this transaction was created */
69962b5647e4a8b9b14998733b765925381b727eMatthew Ahrens /* need to wait for sufficient dirty space */
d20e665c84abf083a9e8b62cca93383ecb55afdfRicardo M. Correia list_node_t dcb_node; /* linked to tx_callbacks list */
d20e665c84abf083a9e8b62cca93383ecb55afdfRicardo M. Correia dmu_tx_callback_func_t *dcb_func; /* caller function pointer */
d20e665c84abf083a9e8b62cca93383ecb55afdfRicardo M. Correia void *dcb_data; /* caller private data */
fa9e4066f08beec538e775443c5be79dd423fcabahrens * These routines are defined in dmu.h, and are called by the user.
3b2aab18808792cbd248a12f1edf139b89833c13Matthew Ahrensint dmu_tx_assign(dmu_tx_t *tx, txg_how_t txg_how);
d20e665c84abf083a9e8b62cca93383ecb55afdfRicardo M. Correiavoid dmu_tx_callback_register(dmu_tx_t *tx, dmu_tx_callback_func_t *dcb_func,
d20e665c84abf083a9e8b62cca93383ecb55afdfRicardo M. Correiavoid dmu_tx_do_callbacks(list_t *cb_list, int error);
fa9e4066f08beec538e775443c5be79dd423fcabahrens * These routines are defined in dmu_spa.h, and are called by the SPA.
fa9e4066f08beec538e775443c5be79dd423fcabahrensextern dmu_tx_t *dmu_tx_create_assigned(struct dsl_pool *dp, uint64_t txg);
fa9e4066f08beec538e775443c5be79dd423fcabahrens * These routines are only called by the DMU.
fa9e4066f08beec538e775443c5be79dd423fcabahrensvoid dmu_tx_add_new_object(dmu_tx_t *tx, objset_t *os, uint64_t object);
fa9e4066f08beec538e775443c5be79dd423fcabahrensvoid dmu_tx_willuse_space(dmu_tx_t *tx, int64_t delta);
fa9e4066f08beec538e775443c5be79dd423fcabahrensvoid dmu_tx_dirty_buf(dmu_tx_t *tx, struct dmu_buf_impl *db);
fa9e4066f08beec538e775443c5be79dd423fcabahrens#endif /* _SYS_DMU_TX_H */