Print this page
2605 want to resume interrupted zfs send
Reviewed by: George Wilson <george.wilson@delphix.com>
Reviewed by: Paul Dagnelie <pcd@delphix.com>
Reviewed by: Richard Elling <Richard.Elling@RichardElling.com>
Reviewed by: Xin Li <delphij@freebsd.org>
Reviewed by: Arne Jansen <sensille@gmx.net>
Approved by: Dan McDonald <danmcd@omniti.com>
5765 add support for estimating send stream size with lzc_send_space when source is a bookmark
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Reviewed by: Christopher Siden <christopher.siden@delphix.com>
Reviewed by: Steven Hartland <killing@multiplay.co.uk>
Reviewed by: Bayard Bell <buffer.g.overflow@gmail.com>
Approved by: Albert Lee <trisk@nexenta.com>
NEX-3558 KRRP Integration
Fixup merge results
| Split |
Close |
| Expand all |
| Collapse all |
--- old/usr/src/uts/common/fs/zfs/sys/dmu_send.h
+++ new/usr/src/uts/common/fs/zfs/sys/dmu_send.h
1 1 /*
2 2 * CDDL HEADER START
3 3 *
4 4 * The contents of this file are subject to the terms of the
5 5 * Common Development and Distribution License (the "License").
6 6 * You may not use this file except in compliance with the License.
7 7 *
8 8 * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
9 9 * or http://www.opensolaris.org/os/licensing.
10 10 * See the License for the specific language governing permissions
11 11 * and limitations under the License.
12 12 *
13 13 * When distributing Covered Code, include this CDDL HEADER in each
14 14 * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
|
↓ open down ↓ |
14 lines elided |
↑ open up ↑ |
15 15 * If applicable, add the following below this CDDL HEADER, with the
16 16 * fields enclosed by brackets "[]" replaced with your own identifying
17 17 * information: Portions Copyright [yyyy] [name of copyright owner]
18 18 *
19 19 * CDDL HEADER END
20 20 */
21 21
22 22 /*
23 23 * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
24 24 * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
25 - * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
26 25 * Copyright (c) 2013, Joyent, Inc. All rights reserved.
27 26 * Copyright (c) 2014 Integros [integros.com]
27 + * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
28 28 */
29 29
30 30 #ifndef _DMU_SEND_H
31 31 #define _DMU_SEND_H
32 32
33 33 #include <sys/inttypes.h>
34 34 #include <sys/spa.h>
35 +#include <sys/dmu_impl.h>
36 +#include <sys/dmu_krrp.h>
37 +#include <sys/dsl_dataset.h>
38 +#include <sys/dsl_bookmark.h>
35 39
36 40 struct vnode;
37 41 struct dsl_dataset;
38 42 struct drr_begin;
39 43 struct avl_tree;
40 44 struct dmu_replay_record;
41 45
42 46 extern const char *recv_clone_name;
43 47
44 48 int dmu_send(const char *tosnap, const char *fromsnap, boolean_t embedok,
45 49 boolean_t large_block_ok, boolean_t compressok, int outfd,
46 50 uint64_t resumeobj, uint64_t resumeoff,
47 51 struct vnode *vp, offset_t *off);
48 52 int dmu_send_estimate(struct dsl_dataset *ds, struct dsl_dataset *fromds,
49 53 boolean_t stream_compressed, uint64_t *sizep);
50 54 int dmu_send_estimate_from_txg(struct dsl_dataset *ds, uint64_t fromtxg,
51 55 boolean_t stream_compressed, uint64_t *sizep);
52 56 int dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap,
53 57 boolean_t embedok, boolean_t large_block_ok, boolean_t compressok,
54 - int outfd, struct vnode *vp, offset_t *off);
58 + int outfd, struct vnode *vp, offset_t *off, boolean_t sendsize);
55 59
56 60 typedef struct dmu_recv_cookie {
57 61 struct dsl_dataset *drc_ds;
58 62 struct dmu_replay_record *drc_drr_begin;
59 63 struct drr_begin *drc_drrb;
60 64 const char *drc_tofs;
61 65 const char *drc_tosnap;
62 66 boolean_t drc_newfs;
63 67 boolean_t drc_byteswap;
64 68 boolean_t drc_force;
65 69 boolean_t drc_resumable;
66 70 struct avl_tree *drc_guid_to_ds_map;
67 71 zio_cksum_t drc_cksum;
68 72 uint64_t drc_newsnapobj;
69 73 void *drc_owner;
70 74 cred_t *drc_cred;
75 + dmu_krrp_task_t *drc_krrp_task;
71 76 } dmu_recv_cookie_t;
72 77
78 +int dmu_recv_impl(int fd, char *tofs, char *tosnap, char *origin,
79 + dmu_replay_record_t *drr_begin, boolean_t is_resumable, nvlist_t *props,
80 + nvlist_t *errors, uint64_t *errf,
81 + int cfd, uint64_t *ahdl, uint64_t *sz, boolean_t force,
82 + dmu_krrp_task_t *krrp_task);
83 +int dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_t *to_ds,
84 + zfs_bookmark_phys_t *ancestor_zb, boolean_t is_clone, boolean_t embedok,
85 + boolean_t large_block_ok, boolean_t compressok, int outfd,
86 + uint64_t resumeobj, uint64_t resumeoff, vnode_t *vp, offset_t *off,
87 + dmu_krrp_task_t *krrp_task);
73 88 int dmu_recv_begin(char *tofs, char *tosnap,
74 89 struct dmu_replay_record *drr_begin,
75 - boolean_t force, boolean_t resumable, char *origin, dmu_recv_cookie_t *drc);
90 + boolean_t force, boolean_t resumable, boolean_t force_cksum, char *origin,
91 + dmu_recv_cookie_t *drc);
76 92 int dmu_recv_stream(dmu_recv_cookie_t *drc, struct vnode *vp, offset_t *voffp,
77 - int cleanup_fd, uint64_t *action_handlep);
93 + int cleanup_fd, uint64_t *action_handlep,
94 + dmu_krrp_task_t *krrp_task);
78 95 int dmu_recv_end(dmu_recv_cookie_t *drc, void *owner);
79 96 boolean_t dmu_objset_is_receiving(objset_t *os);
80 97
81 98 #endif /* _DMU_SEND_H */
XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX