summaryrefslogtreecommitdiffstats
path: root/cmd
diff options
context:
space:
mode:
authorMatthew Ahrens <[email protected]>2020-04-23 10:06:57 -0700
committerGitHub <[email protected]>2020-04-23 10:06:57 -0700
commit196bee4cfd576fb15baa6a64ad6501c594f45497 (patch)
treeb0a30594c38416a426e691544beecd7731feb742 /cmd
parent70e5ad31f6425868b8a173bbc2be4ef08a8d949b (diff)
Remove deduplicated send/receive code
Deduplicated send streams (i.e. `zfs send -D` and `zfs receive` of such streams) are deprecated. Deduplicated send streams can be received by first converting them to non-deduplicated with the `zstream redup` command. This commit removes the code for sending and receiving deduplicated send streams. `zfs send -D` will now print a warning, ignore the `-D` flag, and generate a regular (non-deduplicated) send stream. `zfs receive` of a deduplicated send stream will print an error message and fail. The resulting code simplification (especially in the kernel's support for receiving dedup streams) should help enable future performance enhancements. Several new tests are added which leverage `zstream redup`. Reviewed-by: Paul Dagnelie <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Matthew Ahrens <[email protected]> Issue #7887 Issue #10117 Issue #10156 Closes #10212
Diffstat (limited to 'cmd')
-rw-r--r--cmd/zfs/zfs_main.c21
1 files changed, 7 insertions, 14 deletions
diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c
index ae71cdc88..15e350313 100644
--- a/cmd/zfs/zfs_main.c
+++ b/cmd/zfs/zfs_main.c
@@ -21,7 +21,7 @@
/*
* Copyright (c) 2005, 2010, Oracle and/or its affiliates. All rights reserved.
- * Copyright (c) 2011, 2019 by Delphix. All rights reserved.
+ * Copyright (c) 2011, 2020 by Delphix. All rights reserved.
* Copyright 2012 Milan Jurik. All rights reserved.
* Copyright (c) 2012, Joyent, Inc. All rights reserved.
* Copyright (c) 2013 Steven Hartland. All rights reserved.
@@ -4266,7 +4266,10 @@ zfs_do_send(int argc, char **argv)
flags.progress = B_TRUE;
break;
case 'D':
- flags.dedup = B_TRUE;
+ (void) fprintf(stderr,
+ gettext("WARNING: deduplicated send is no "
+ "longer supported. A regular,\n"
+ "non-deduplicated stream will be generated.\n\n"));
break;
case 'n':
flags.dryrun = B_TRUE;
@@ -4333,16 +4336,6 @@ zfs_do_send(int argc, char **argv)
}
}
- if (flags.dedup) {
- (void) fprintf(stderr,
- gettext("WARNING: deduplicated send is "
- "deprecated, and will be removed in a\n"
- "future release. (In the future, the flag will be "
- "accepted, but a\n"
- "regular, non-deduplicated stream will be "
- "generated.)\n\n"));
- }
-
if (flags.parsable && flags.verbosity == 0)
flags.verbosity = 1;
@@ -4351,7 +4344,7 @@ zfs_do_send(int argc, char **argv)
if (resume_token != NULL) {
if (fromname != NULL || flags.replicate || flags.props ||
- flags.backup || flags.dedup || flags.holds ||
+ flags.backup || flags.holds ||
flags.saved || redactbook != NULL) {
(void) fprintf(stderr,
gettext("invalid flags combined with -t\n"));
@@ -4375,7 +4368,7 @@ zfs_do_send(int argc, char **argv)
if (flags.saved) {
if (fromname != NULL || flags.replicate || flags.props ||
- flags.doall || flags.backup || flags.dedup ||
+ flags.doall || flags.backup ||
flags.holds || flags.largeblock || flags.embed_data ||
flags.compress || flags.raw || redactbook != NULL) {
(void) fprintf(stderr, gettext("incompatible flags "