diff options
author | delphij <delphij@FreeBSD.org> | 2014-07-01 06:43:15 +0000 |
---|---|---|
committer | delphij <delphij@FreeBSD.org> | 2014-07-01 06:43:15 +0000 |
commit | f95fd16f8d88667bcf37bb162d3f8fcc9f888cc7 (patch) | |
tree | 9f7200d4f5181a0103b0d7eb1ea7c229e3750211 /cddl/contrib/opensolaris/lib/libzfs_core | |
parent | cd12aa0ab76d9d3638dc079c863eb0c93393a4d4 (diff) | |
parent | 3790348a90c72ae3b320ff6ce50ad718fd6ef61d (diff) | |
download | FreeBSD-src-f95fd16f8d88667bcf37bb162d3f8fcc9f888cc7.zip FreeBSD-src-f95fd16f8d88667bcf37bb162d3f8fcc9f888cc7.tar.gz |
MFV r267565:
4757 ZFS embedded-data block pointers ("zero block compression")
4913 zfs release should not be subject to space checks
MFC after: 2 weeks
Diffstat (limited to 'cddl/contrib/opensolaris/lib/libzfs_core')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c | 12 | ||||
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h | 6 |
2 files changed, 16 insertions, 2 deletions
diff --git a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c index 1c87223..cb38dc2 100644 --- a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c +++ b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c @@ -486,6 +486,8 @@ lzc_get_holds(const char *snapname, nvlist_t **holdsp) } /* + * Generate a zfs send stream for the specified snapshot and write it to + * the specified file descriptor. * * "snapname" is the full name of the snapshot to send (e.g. "pool/fs@snap") * @@ -499,9 +501,15 @@ lzc_get_holds(const char *snapname, nvlist_t **holdsp) * snapshot in the origin, etc. * * "fd" is the file descriptor to write the send stream to. + * + * If "flags" contains LZC_SEND_FLAG_EMBED_DATA, the stream is permitted + * to contain DRR_WRITE_EMBEDDED records with drr_etype==BP_EMBEDDED_TYPE_DATA, + * which the receiving system must support (as indicated by support + * for the "embedded_data" feature). */ int -lzc_send(const char *snapname, const char *from, int fd) +lzc_send(const char *snapname, const char *from, int fd, + enum lzc_send_flags flags) { nvlist_t *args; int err; @@ -510,6 +518,8 @@ lzc_send(const char *snapname, const char *from, int fd) fnvlist_add_int32(args, "fd", fd); if (from != NULL) fnvlist_add_string(args, "fromsnap", from); + if (flags & LZC_SEND_FLAG_EMBED_DATA) + fnvlist_add_boolean(args, "embedok"); err = lzc_ioctl(ZFS_IOC_SEND_NEW, snapname, args, NULL); nvlist_free(args); return (err); diff --git a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h index 380560f..99883fe 100644 --- a/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h +++ b/cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.h @@ -53,7 +53,11 @@ int lzc_hold(nvlist_t *, int, nvlist_t **); int lzc_release(nvlist_t *, nvlist_t **); int lzc_get_holds(const char *, nvlist_t **); -int lzc_send(const char *, const char *, int); +enum lzc_send_flags { + LZC_SEND_FLAG_EMBED_DATA = 1 << 0 +}; + +int lzc_send(const char *, const char *, int, enum lzc_send_flags); int lzc_receive(const char *, nvlist_t *, const char *, boolean_t, int); int lzc_send_space(const char *, const char *, uint64_t *); |