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/common/libzfs_core.c | |
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/common/libzfs_core.c')
-rw-r--r-- | cddl/contrib/opensolaris/lib/libzfs_core/common/libzfs_core.c | 12 |
1 files changed, 11 insertions, 1 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); |