]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - include/sys/dmu_send.h
Vendor import of openzfs master @ 184df27eef0abdc7ab2105b21257f753834b936b
[FreeBSD/FreeBSD.git] / include / sys / dmu_send.h
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
9  * or http://www.opensolaris.org/os/licensing.
10  * See the License for the specific language governing permissions
11  * and limitations under the License.
12  *
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]
18  *
19  * CDDL HEADER END
20  */
21
22 /*
23  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24  * Copyright (c) 2012, 2018 by Delphix. All rights reserved.
25  * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
27  */
28
29 #ifndef _DMU_SEND_H
30 #define _DMU_SEND_H
31
32 #include <sys/inttypes.h>
33 #include <sys/dsl_crypt.h>
34 #include <sys/dsl_bookmark.h>
35 #include <sys/spa.h>
36 #include <sys/objlist.h>
37 #include <sys/dsl_bookmark.h>
38 #include <sys/dmu_redact.h>
39
40 #define BEGINNV_REDACT_SNAPS            "redact_snaps"
41 #define BEGINNV_REDACT_FROM_SNAPS       "redact_from_snaps"
42 #define BEGINNV_RESUME_OBJECT           "resume_object"
43 #define BEGINNV_RESUME_OFFSET           "resume_offset"
44
45 struct vnode;
46 struct dsl_dataset;
47 struct drr_begin;
48 struct avl_tree;
49 struct dmu_replay_record;
50 struct dmu_send_outparams;
51 int
52 dmu_send(const char *tosnap, const char *fromsnap, boolean_t embedok,
53     boolean_t large_block_ok, boolean_t compressok, boolean_t rawok,
54     boolean_t savedok, uint64_t resumeobj, uint64_t resumeoff,
55     const char *redactbook, int outfd, offset_t *off,
56     struct dmu_send_outparams *dsop);
57 int dmu_send_estimate_fast(struct dsl_dataset *ds, struct dsl_dataset *fromds,
58     zfs_bookmark_phys_t *frombook, boolean_t stream_compressed,
59     boolean_t saved, uint64_t *sizep);
60 int dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap,
61     boolean_t embedok, boolean_t large_block_ok, boolean_t compressok,
62     boolean_t rawok, boolean_t savedok, int outfd, offset_t *off,
63     struct dmu_send_outparams *dso);
64
65 typedef int (*dmu_send_outfunc_t)(objset_t *os, void *buf, int len, void *arg);
66 typedef struct dmu_send_outparams {
67         dmu_send_outfunc_t      dso_outfunc;
68         void                    *dso_arg;
69         boolean_t               dso_dryrun;
70 } dmu_send_outparams_t;
71
72 #endif /* _DMU_SEND_H */