Illumos #1748: desire support for reguid in zfs
[zfs.git] / include / sys / dmu.h
index 7040b67..3f9c711 100644 (file)
@@ -41,9 +41,6 @@
 #include <sys/cred.h>
 #include <sys/time.h>
 #include <sys/uio.h>
-#ifdef _KERNEL
-#include <sys/blkdev.h>
-#endif
 
 #ifdef __cplusplus
 extern "C" {
@@ -514,6 +511,7 @@ void dmu_write(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
 void dmu_prealloc(objset_t *os, uint64_t object, uint64_t offset, uint64_t size,
        dmu_tx_t *tx);
 #ifdef _KERNEL
+#include <linux/blkdev_compat.h>
 int dmu_read_req(objset_t *os, uint64_t object, struct request *req);
 int dmu_write_req(objset_t *os, uint64_t object, struct request *req,
        dmu_tx_t *tx);
@@ -645,6 +643,7 @@ extern uint64_t dmu_objset_syncprop(objset_t *os);
 extern uint64_t dmu_objset_logbias(objset_t *os);
 extern int dmu_snapshot_list_next(objset_t *os, int namelen, char *name,
     uint64_t *id, uint64_t *offp, boolean_t *case_conflict);
+extern int dmu_snapshot_id(objset_t *os, const char *snapname, uint64_t *idp);
 extern int dmu_snapshot_realname(objset_t *os, char *name, char *real,
     int maxlen, boolean_t *conflict);
 extern int dmu_dir_list_next(objset_t *os, int namelen, char *name,
@@ -723,6 +722,7 @@ typedef struct dmu_recv_cookie {
        char *drc_top_ds;
        boolean_t drc_newfs;
        boolean_t drc_force;
+       struct avl_tree *drc_guid_to_ds_map;
 } dmu_recv_cookie_t;
 
 int dmu_recv_begin(char *tofs, char *tosnap, char *topds, struct drr_begin *,