From 652bdc9b0ed73476c4120dc2db16bd2f16f63708 Mon Sep 17 00:00:00 2001 From: Matthew Ahrens Date: Wed, 18 Mar 2020 13:31:10 -0700 Subject: Deprecate deduplicated send streams Dedup send can only deduplicate over the set of blocks in the send command being invoked, and it does not take advantage of the dedup table to do so. This is a very common misconception among not only users, but developers, and makes the feature seem more useful than it is. As a result, many users are using the feature but not getting any benefit from it. Dedup send requires a nontrivial expenditure of memory and CPU to operate, especially if the dataset(s) being sent is (are) not already using a dedup-strength checksum. Dedup send adds developer burden. It expands the test matrix when developing new features, causing bugs in released code, and delaying development efforts by forcing more testing to be done. As a result, we are deprecating the use of `zfs send -D` and receiving of such streams. This change adds a warning to the man page, and also prints the warning whenever dedup send or receive are used. In a future release, we plan to: 1. remove the kernel code for generating deduplicated streams 2. make `zfs send -D` generate regular, non-deduplicated streams 3. remove the kernel code for receiving deduplicated streams 4. make `zfs receive` of deduplicated streams process them in userland to "re-duplicate" them, so that they can still be received. Reviewed-by: Paul Dagnelie Reviewed-by: Brian Behlendorf Reviewed-by: George Melikov Signed-off-by: Matthew Ahrens Closes #7887 Closes #10117 --- cmd/zfs/zfs_main.c | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'cmd') diff --git a/cmd/zfs/zfs_main.c b/cmd/zfs/zfs_main.c index 150bebd32..2c719fc47 100644 --- a/cmd/zfs/zfs_main.c +++ b/cmd/zfs/zfs_main.c @@ -4328,6 +4328,16 @@ 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; -- cgit v1.2.3