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, 2014 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/spa.h>
34
35 struct vnode;
36 struct dsl_dataset;
37 struct drr_begin;
38 struct avl_tree;
39 struct dmu_replay_record;
40
41 extern const char *recv_clone_name;
42
43 int dmu_send(const char *tosnap, const char *fromsnap, boolean_t embedok,
44 boolean_t large_block_ok, int outfd, uint64_t resumeobj, uint64_t resumeoff,
45 struct vnode *vp, offset_t *off);
46 int dmu_send_estimate(struct dsl_dataset *ds, struct dsl_dataset *fromds,
47 uint64_t *sizep);
48 int dmu_send_estimate_from_txg(struct dsl_dataset *ds, uint64_t fromtxg,
49 uint64_t *sizep);
50 int dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap,
51 boolean_t embedok, boolean_t large_block_ok,
52 int outfd, struct vnode *vp, offset_t *off);
53
54 typedef struct dmu_recv_cookie {
55 struct dsl_dataset *drc_ds;
56 struct dmu_replay_record *drc_drr_begin;
57 struct drr_begin *drc_drrb;
58 const char *drc_tofs;
59 const char *drc_tosnap;
60 boolean_t drc_newfs;
61 boolean_t drc_byteswap;
62 boolean_t drc_force;
63 boolean_t drc_resumable;
64 struct avl_tree *drc_guid_to_ds_map;
65 zio_cksum_t drc_cksum;
66 uint64_t drc_newsnapobj;
67 void *drc_owner;
68 cred_t *drc_cred;
69 } dmu_recv_cookie_t;
70
71 int dmu_recv_begin(char *tofs, char *tosnap,
72 struct dmu_replay_record *drr_begin,
|
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, 2014 by Delphix. All rights reserved.
25 * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26 * Copyright (c) 2013, Joyent, Inc. All rights reserved.
27 * Copyright 2015 RackTop Systems.
28 */
29
30 #ifndef _DMU_SEND_H
31 #define _DMU_SEND_H
32
33 #include <sys/inttypes.h>
34 #include <sys/spa.h>
35
36 struct vnode;
37 struct dsl_dataset;
38 struct drr_begin;
39 struct avl_tree;
40 struct dmu_replay_record;
41
42 extern const char *recv_clone_name;
43
44 int dmu_send(const char *tosnap, const char *fromsnap, boolean_t embedok,
45 boolean_t large_block_ok, int outfd, uint64_t resumeobj, uint64_t resumeoff,
46 boolean_t skip_free, struct vnode *vp, offset_t *off);
47 int dmu_send_estimate(struct dsl_dataset *ds, struct dsl_dataset *fromds,
48 uint64_t *sizep);
49 int dmu_send_estimate_from_txg(struct dsl_dataset *ds, uint64_t fromtxg,
50 uint64_t *sizep);
51 int dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap,
52 boolean_t embedok, boolean_t large_block_ok,
53 int outfd, boolean_t skip_free, struct vnode *vp, offset_t *off);
54
55 typedef struct dmu_recv_cookie {
56 struct dsl_dataset *drc_ds;
57 struct dmu_replay_record *drc_drr_begin;
58 struct drr_begin *drc_drrb;
59 const char *drc_tofs;
60 const char *drc_tosnap;
61 boolean_t drc_newfs;
62 boolean_t drc_byteswap;
63 boolean_t drc_force;
64 boolean_t drc_resumable;
65 struct avl_tree *drc_guid_to_ds_map;
66 zio_cksum_t drc_cksum;
67 uint64_t drc_newsnapobj;
68 void *drc_owner;
69 cred_t *drc_cred;
70 } dmu_recv_cookie_t;
71
72 int dmu_recv_begin(char *tofs, char *tosnap,
73 struct dmu_replay_record *drr_begin,
|