X-Git-Url: https://git.camperquake.de/gitweb.cgi?a=blobdiff_plain;f=include%2Fsys%2Fdmu.h;h=5b2e25b78cf66b82c8e3ab40f52327b258a963b6;hb=1bd201e70d57464fd26bf9089ea4b44fd49e4f2d;hp=575cb2d10980bf61fb6267c0473e445be89b0c79;hpb=6283f55ea1b91e680386388c17d14b89e344fa8d;p=zfs.git diff --git a/include/sys/dmu.h b/include/sys/dmu.h index 575cb2d..5b2e25b 100644 --- a/include/sys/dmu.h +++ b/include/sys/dmu.h @@ -20,6 +20,7 @@ */ /* * Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved. + * Copyright (c) 2011 by Delphix. All rights reserved. */ /* Portions Copyright 2010 Robert Milkowski */ @@ -41,9 +42,6 @@ #include #include #include -#ifdef _KERNEL -#include -#endif #ifdef __cplusplus extern "C" { @@ -193,7 +191,7 @@ int dmu_objset_create(const char *name, dmu_objset_type_t type, uint64_t flags, int dmu_objset_clone(const char *name, struct dsl_dataset *clone_origin, uint64_t flags); int dmu_objset_destroy(const char *name, boolean_t defer); -int dmu_snapshots_destroy(char *fsname, char *snapname, boolean_t defer); +int dmu_snapshots_destroy_nvl(struct nvlist *snaps, boolean_t defer, char *); int dmu_objset_snapshot(char *fsname, char *snapname, char *tag, struct nvlist *props, boolean_t recursive, boolean_t temporary, int fd); int dmu_objset_rename(const char *name, const char *newname, @@ -514,12 +512,15 @@ 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 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); -#endif -#ifdef HAVE_ZPL -int dmu_write_pages(objset_t *os, uint64_t object, uint64_t offset, - uint64_t size, struct page *pp, dmu_tx_t *tx); +int dmu_write_req(objset_t *os, uint64_t object, struct request *req, + dmu_tx_t *tx); +int dmu_read_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size); +int dmu_write_uio(objset_t *os, uint64_t object, struct uio *uio, uint64_t size, + dmu_tx_t *tx); +int dmu_write_uio_dbuf(dmu_buf_t *zdb, struct uio *uio, uint64_t size, + dmu_tx_t *tx); #endif struct arc_buf *dmu_request_arcbuf(dmu_buf_t *handle, int size); void dmu_return_arcbuf(struct arc_buf *buf); @@ -643,6 +644,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, @@ -705,6 +707,8 @@ void dmu_traverse_objset(objset_t *os, uint64_t txg_start, int dmu_sendbackup(objset_t *tosnap, objset_t *fromsnap, boolean_t fromorigin, struct vnode *vp, offset_t *off); +int dmu_send_estimate(objset_t *tosnap, objset_t *fromsnap, boolean_t fromorign, + uint64_t *sizep); typedef struct dmu_recv_cookie { /* @@ -721,6 +725,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 *,