]>
git.proxmox.com Git - mirror_zfs.git/blob - include/sys/dmu_send.h
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]
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.
32 #include <sys/inttypes.h>
40 int dmu_send(const char *tosnap
, const char *fromsnap
,
41 boolean_t embedok
, boolean_t large_block_ok
,
42 int outfd
, struct vnode
*vp
, offset_t
*off
);
43 int dmu_send_estimate(struct dsl_dataset
*ds
, struct dsl_dataset
*fromds
,
45 int dmu_send_estimate_from_txg(struct dsl_dataset
*ds
, uint64_t fromtxg
,
47 int dmu_send_obj(const char *pool
, uint64_t tosnap
, uint64_t fromsnap
,
48 boolean_t embedok
, boolean_t large_block_ok
,
49 int outfd
, struct vnode
*vp
, offset_t
*off
);
51 typedef struct dmu_recv_cookie
{
52 struct dsl_dataset
*drc_ds
;
53 struct drr_begin
*drc_drrb
;
55 const char *drc_tosnap
;
57 boolean_t drc_byteswap
;
59 struct avl_tree
*drc_guid_to_ds_map
;
60 zio_cksum_t drc_cksum
;
61 uint64_t drc_newsnapobj
;
66 int dmu_recv_begin(char *tofs
, char *tosnap
, struct drr_begin
*drrb
,
67 boolean_t force
, char *origin
, dmu_recv_cookie_t
*drc
);
68 int dmu_recv_stream(dmu_recv_cookie_t
*drc
, struct vnode
*vp
, offset_t
*voffp
,
69 int cleanup_fd
, uint64_t *action_handlep
);
70 int dmu_recv_end(dmu_recv_cookie_t
*drc
, void *owner
);
71 boolean_t
dmu_objset_is_receiving(objset_t
*os
);
73 #endif /* _DMU_SEND_H */