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

@@ -20,20 +20,24 @@
  */
 
 /*
  * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
  * Copyright (c) 2012, 2014 by Delphix. All rights reserved.
- * Copyright 2011 Nexenta Systems, Inc. All rights reserved.
  * Copyright (c) 2013, Joyent, Inc. All rights reserved.
  * Copyright (c) 2014 Integros [integros.com]
+ * Copyright 2017 Nexenta Systems, Inc. All rights reserved.
  */
 
 #ifndef _DMU_SEND_H
 #define _DMU_SEND_H
 
 #include <sys/inttypes.h>
 #include <sys/spa.h>
+#include <sys/dmu_impl.h>
+#include <sys/dmu_krrp.h>
+#include <sys/dsl_dataset.h>
+#include <sys/dsl_bookmark.h>
 
 struct vnode;
 struct dsl_dataset;
 struct drr_begin;
 struct avl_tree;

@@ -49,11 +53,11 @@
     boolean_t stream_compressed, uint64_t *sizep);
 int dmu_send_estimate_from_txg(struct dsl_dataset *ds, uint64_t fromtxg,
     boolean_t stream_compressed, uint64_t *sizep);
 int dmu_send_obj(const char *pool, uint64_t tosnap, uint64_t fromsnap,
     boolean_t embedok, boolean_t large_block_ok, boolean_t compressok,
-    int outfd, struct vnode *vp, offset_t *off);
+    int outfd, struct vnode *vp, offset_t *off, boolean_t sendsize);
 
 typedef struct dmu_recv_cookie {
         struct dsl_dataset *drc_ds;
         struct dmu_replay_record *drc_drr_begin;
         struct drr_begin *drc_drrb;

@@ -66,16 +70,29 @@
         struct avl_tree *drc_guid_to_ds_map;
         zio_cksum_t drc_cksum;
         uint64_t drc_newsnapobj;
         void *drc_owner;
         cred_t *drc_cred;
+        dmu_krrp_task_t *drc_krrp_task;
 } dmu_recv_cookie_t;
 
+int dmu_recv_impl(int fd, char *tofs, char *tosnap, char *origin,
+    dmu_replay_record_t *drr_begin, boolean_t is_resumable, nvlist_t *props,
+    nvlist_t *errors, uint64_t *errf,
+    int cfd, uint64_t *ahdl, uint64_t *sz, boolean_t force,
+    dmu_krrp_task_t *krrp_task);
+int dmu_send_impl(void *tag, dsl_pool_t *dp, dsl_dataset_t *to_ds,
+    zfs_bookmark_phys_t *ancestor_zb, boolean_t is_clone, boolean_t embedok,
+    boolean_t large_block_ok, boolean_t compressok, int outfd,
+    uint64_t resumeobj, uint64_t resumeoff, vnode_t *vp, offset_t *off,
+    dmu_krrp_task_t *krrp_task);
 int dmu_recv_begin(char *tofs, char *tosnap,
     struct dmu_replay_record *drr_begin,
-    boolean_t force, boolean_t resumable, char *origin, dmu_recv_cookie_t *drc);
+    boolean_t force, boolean_t resumable, boolean_t force_cksum, char *origin,
+    dmu_recv_cookie_t *drc);
 int dmu_recv_stream(dmu_recv_cookie_t *drc, struct vnode *vp, offset_t *voffp,
-    int cleanup_fd, uint64_t *action_handlep);
+    int cleanup_fd, uint64_t *action_handlep,
+    dmu_krrp_task_t *krrp_task);
 int dmu_recv_end(dmu_recv_cookie_t *drc, void *owner);
 boolean_t dmu_objset_is_receiving(objset_t *os);
 
 #endif /* _DMU_SEND_H */