4 * The contents of this file are subject to the terms of the
5 * Common Development and Distribution License (the "License").
6 * You may not use this file except in compliance with the License.
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.
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]
22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
23 * Copyright (c) 2012 by Delphix. All rights reserved.
26 #ifndef _SYS_DSL_SYNCTASK_H
27 #define _SYS_DSL_SYNCTASK_H
30 #include <sys/zfs_context.h>
38 typedef int (dsl_checkfunc_t)(void *, dmu_tx_t *);
39 typedef void (dsl_syncfunc_t)(void *, dmu_tx_t *);
41 typedef struct dsl_sync_task {
43 struct dsl_pool *dst_pool;
46 dsl_checkfunc_t *dst_checkfunc;
47 dsl_syncfunc_t *dst_syncfunc;
50 boolean_t dst_nowaiter;
53 void dsl_sync_task_sync(dsl_sync_task_t *dst, dmu_tx_t *tx);
54 int dsl_sync_task(const char *pool, dsl_checkfunc_t *checkfunc,
55 dsl_syncfunc_t *syncfunc, void *arg, int blocks_modified);
56 void dsl_sync_task_nowait(struct dsl_pool *dp, dsl_syncfunc_t *syncfunc,
57 void *arg, int blocks_modified, dmu_tx_t *tx);
63 #endif /* _SYS_DSL_SYNCTASK_H */