dsl_synctask.h (219089) | dsl_synctask.h (248571) |
---|---|
1/* 2 * CDDL HEADER START 3 * 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. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 6 unchanged lines hidden (view full) --- 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] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. | 1/* 2 * CDDL HEADER START 3 * 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. 7 * 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE --- 6 unchanged lines hidden (view full) --- 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] 18 * 19 * CDDL HEADER END 20 */ 21/* 22 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. |
23 * Copyright (c) 2012 by Delphix. All rights reserved. |
|
23 */ 24 25#ifndef _SYS_DSL_SYNCTASK_H 26#define _SYS_DSL_SYNCTASK_H 27 28#include <sys/txg.h> 29#include <sys/zfs_context.h> 30 31#ifdef __cplusplus 32extern "C" { 33#endif 34 35struct dsl_pool; 36 | 24 */ 25 26#ifndef _SYS_DSL_SYNCTASK_H 27#define _SYS_DSL_SYNCTASK_H 28 29#include <sys/txg.h> 30#include <sys/zfs_context.h> 31 32#ifdef __cplusplus 33extern "C" { 34#endif 35 36struct dsl_pool; 37 |
37typedef int (dsl_checkfunc_t)(void *, void *, dmu_tx_t *); 38typedef void (dsl_syncfunc_t)(void *, void *, dmu_tx_t *); | 38typedef int (dsl_checkfunc_t)(void *, dmu_tx_t *); 39typedef void (dsl_syncfunc_t)(void *, dmu_tx_t *); |
39 40typedef struct dsl_sync_task { | 40 41typedef struct dsl_sync_task { |
41 list_node_t dst_node; | 42 txg_node_t dst_node; 43 struct dsl_pool *dst_pool; 44 uint64_t dst_txg; 45 int dst_space; |
42 dsl_checkfunc_t *dst_checkfunc; 43 dsl_syncfunc_t *dst_syncfunc; | 46 dsl_checkfunc_t *dst_checkfunc; 47 dsl_syncfunc_t *dst_syncfunc; |
44 void *dst_arg1; 45 void *dst_arg2; 46 int dst_err; | 48 void *dst_arg; 49 int dst_error; 50 boolean_t dst_nowaiter; |
47} dsl_sync_task_t; 48 | 51} dsl_sync_task_t; 52 |
49typedef struct dsl_sync_task_group { 50 txg_node_t dstg_node; 51 list_t dstg_tasks; 52 struct dsl_pool *dstg_pool; 53 uint64_t dstg_txg; 54 int dstg_err; 55 int dstg_space; 56 boolean_t dstg_nowaiter; 57} dsl_sync_task_group_t; | 53void dsl_sync_task_sync(dsl_sync_task_t *dst, dmu_tx_t *tx); 54int dsl_sync_task(const char *pool, dsl_checkfunc_t *checkfunc, 55 dsl_syncfunc_t *syncfunc, void *arg, int blocks_modified); 56void dsl_sync_task_nowait(struct dsl_pool *dp, dsl_syncfunc_t *syncfunc, 57 void *arg, int blocks_modified, dmu_tx_t *tx); |
58 | 58 |
59dsl_sync_task_group_t *dsl_sync_task_group_create(struct dsl_pool *dp); 60void dsl_sync_task_create(dsl_sync_task_group_t *dstg, 61 dsl_checkfunc_t *, dsl_syncfunc_t *, 62 void *arg1, void *arg2, int blocks_modified); 63int dsl_sync_task_group_wait(dsl_sync_task_group_t *dstg); 64void dsl_sync_task_group_nowait(dsl_sync_task_group_t *dstg, dmu_tx_t *tx); 65void dsl_sync_task_group_destroy(dsl_sync_task_group_t *dstg); 66void dsl_sync_task_group_sync(dsl_sync_task_group_t *dstg, dmu_tx_t *tx); 67 68int dsl_sync_task_do(struct dsl_pool *dp, 69 dsl_checkfunc_t *checkfunc, dsl_syncfunc_t *syncfunc, 70 void *arg1, void *arg2, int blocks_modified); 71void dsl_sync_task_do_nowait(struct dsl_pool *dp, 72 dsl_checkfunc_t *checkfunc, dsl_syncfunc_t *syncfunc, 73 void *arg1, void *arg2, int blocks_modified, dmu_tx_t *tx); 74 | |
75#ifdef __cplusplus 76} 77#endif 78 79#endif /* _SYS_DSL_SYNCTASK_H */ | 59#ifdef __cplusplus 60} 61#endif 62 63#endif /* _SYS_DSL_SYNCTASK_H */ |