Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

OpenZFS 7252 - compressed zfs send / receive #6067

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 17 additions & 1 deletion cmd/zfs/zfs_main.c
Original file line number Diff line number Diff line change
Expand Up @@ -32,6 +32,7 @@
#include <assert.h>
#include <ctype.h>
#include <errno.h>
#include <getopt.h>
#include <libgen.h>
#include <libintl.h>
#include <libuutil.h>
Expand Down Expand Up @@ -3771,8 +3772,23 @@ zfs_do_send(int argc, char **argv)
nvlist_t *dbgnv = NULL;
boolean_t extraverbose = B_FALSE;

struct option long_options[] = {
{"replicate", no_argument, NULL, 'R'},
{"props", no_argument, NULL, 'p'},
{"parsable", no_argument, NULL, 'P'},
{"dedup", no_argument, NULL, 'D'},
{"verbose", no_argument, NULL, 'v'},
{"dryrun", no_argument, NULL, 'n'},
{"large-block", no_argument, NULL, 'L'},
{"embed", no_argument, NULL, 'e'},
{"resume", required_argument, NULL, 't'},
{"compressed", no_argument, NULL, 'c'},
{0, 0, 0, 0}
};

/* check options */
while ((c = getopt(argc, argv, ":i:I:RDpvnPLet:c")) != -1) {
while ((c = getopt_long(argc, argv, ":i:I:RDpvnPLet:c", long_options,
NULL)) != -1) {
switch (c) {
case 'i':
if (fromname)
Expand Down
4 changes: 2 additions & 2 deletions cmd/zstreamdump/zstreamdump.c
Original file line number Diff line number Diff line change
Expand Up @@ -430,8 +430,8 @@ main(int argc, char *argv[])
drro->drr_bonuslen);
}
if (drro->drr_bonuslen > 0) {
(void) ssread(buf, P2ROUNDUP(drro->drr_bonuslen,
8), &zc);
(void) ssread(buf,
P2ROUNDUP(drro->drr_bonuslen, 8), &zc);
if (dump) {
print_block(buf,
P2ROUNDUP(drro->drr_bonuslen, 8));
Expand Down
4 changes: 2 additions & 2 deletions lib/libzfs_core/libzfs_core.c
Original file line number Diff line number Diff line change
Expand Up @@ -493,10 +493,10 @@ lzc_send_resume(const char *snapname, const char *from, int fd,
fnvlist_add_string(args, "fromsnap", from);
if (flags & LZC_SEND_FLAG_LARGE_BLOCK)
fnvlist_add_boolean(args, "largeblockok");
if (flags & LZC_SEND_FLAG_COMPRESS)
fnvlist_add_boolean(args, "compressok");
if (flags & LZC_SEND_FLAG_EMBED_DATA)
fnvlist_add_boolean(args, "embedok");
if (flags & LZC_SEND_FLAG_COMPRESS)
fnvlist_add_boolean(args, "compressok");
if (resumeobj != 0 || resumeoff != 0) {
fnvlist_add_uint64(args, "resume_object", resumeobj);
fnvlist_add_uint64(args, "resume_offset", resumeoff);
Expand Down
20 changes: 10 additions & 10 deletions man/man8/zfs.8
Original file line number Diff line number Diff line change
Expand Up @@ -2755,7 +2755,7 @@ Generate a stream package that sends all intermediary snapshots from the first s
.sp
.ne 2
.na
\fB\fB-R\fR\fR
\fB\fB-R\fR, \fB--replicate\fR\fR
.ad
.sp .6
.RS 4n
Expand All @@ -2767,7 +2767,7 @@ If the \fB-i\fR or \fB-I\fR flags are used in conjunction with the \fB-R\fR flag
.sp
.ne 2
.na
\fB\fB-D\fR\fR
\fB\fB-D\fR, \fB--dedup\fR\fR
.ad
.sp .6
.RS 4n
Expand All @@ -2777,7 +2777,7 @@ Generate a deduplicated stream. Blocks which would have been sent multiple times
.sp
.ne 2
.na
\fB\fB-L\fR\fR
\fB\fB-L\fR, \fB--large-block\fR\fR
.ad
.sp .6
.RS 4n
Expand All @@ -2792,7 +2792,7 @@ flags and the \fBlarge_blocks\fR feature.
.sp
.ne 2
.na
\fB\fB-e\fR\fR
\fB\fB-e\fR, \fB--embed\fR\fR
.ad
.sp .6
.RS 4n
Expand Down Expand Up @@ -2825,7 +2825,7 @@ decompressed before sending so it can be split into smaller block sizes.
.sp
.ne 2
.na
\fB\fB-p\fR\fR
\fB\fB-p\fR, \fB--props\fR\fR
.ad
.sp .6
.RS 4n
Expand All @@ -2835,7 +2835,7 @@ Include the dataset's properties in the stream. This flag is implicit when -R i
.sp
.ne 2
.na
\fB\fB-n\fR\fR
\fB\fB-n\fR, \fB--dryrun\fR\fR
.ad
.sp .6
.RS 4n
Expand All @@ -2849,7 +2849,7 @@ to standard output and the verbose output goes to standard error).
.sp
.ne 2
.na
\fB\fB-P\fR\fR
\fB\fB-P\fR, \fB--parsable\fR\fR
.ad
.sp .6
.RS 4n
Expand All @@ -2859,7 +2859,7 @@ Print machine-parsable verbose information about the stream package generated.
.sp
.ne 2
.na
\fB\fB-v\fR\fR
\fB\fB-v\fR, \fB--verbose\fR\fR
.ad
.sp .6
.RS 4n
Expand Down Expand Up @@ -2887,7 +2887,7 @@ name will be "--head--".
.sp
.ne 2
.na
\fB\fB-L\fR\fR
\fB\fB-L\fR, \fB--large-block\fR\fR
.ad
.sp .6
.RS 4n
Expand All @@ -2902,7 +2902,7 @@ flags and the \fBlarge_blocks\fR feature.
.sp
.ne 2
.na
\fB\fB-e\fR\fR
\fB\fB-e\fR, \fB--embed\fR\fR
.ad
.sp .6
.RS 4n
Expand Down
Loading