mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2025-06-29 12:37:35 +03:00

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 <pcd@delphix.com> Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov> Signed-off-by: Matthew Ahrens <mahrens@delphix.com> Issue #7887 Issue #10117 Issue #10156 Closes #10212
54 lines
1.4 KiB
Bash
Executable File
54 lines
1.4 KiB
Bash
Executable File
#!/bin/ksh -p
|
|
#
|
|
# CDDL HEADER START
|
|
#
|
|
# This file and its contents are supplied under the terms of the
|
|
# Common Development and Distribution License ("CDDL"), version 1.0.
|
|
# You may only use this file in accordance with the terms of version
|
|
# 1.0 of the CDDL.
|
|
#
|
|
# A full copy of the text of the CDDL should have accompanied this
|
|
# source. A copy of the CDDL is also available via the Internet at
|
|
# http://www.illumos.org/license/CDDL.
|
|
#
|
|
# CDDL HEADER END
|
|
#
|
|
|
|
#
|
|
# Copyright (c) 2020 by Delphix. All rights reserved.
|
|
#
|
|
|
|
. $STF_SUITE/tests/functional/rsend/rsend.kshlib
|
|
|
|
#
|
|
# DESCRIPTION:
|
|
# Verifies that we can receive a dedup send stream by processing it with
|
|
# "zstream redup".
|
|
#
|
|
|
|
verify_runnable "both"
|
|
|
|
function cleanup
|
|
{
|
|
destroy_dataset $TESTPOOL/recv "-r"
|
|
rm -r /$TESTPOOL/tar
|
|
rm $sendfile
|
|
}
|
|
log_onexit cleanup
|
|
|
|
log_assert "Verify zfs can receive dedup send streams with 'zstream redup'"
|
|
|
|
typeset sendfile_compressed=$STF_SUITE/tests/functional/rsend/dedup.zsend.bz2
|
|
typeset sendfile=/$TESTPOOL/dedup.zsend
|
|
typeset tarfile=$STF_SUITE/tests/functional/rsend/fs.tar.gz
|
|
|
|
log_must eval "bzcat <$sendfile_compressed >$sendfile"
|
|
log_must zfs create $TESTPOOL/recv
|
|
log_must eval "zstream redup $sendfile | zfs recv -d $TESTPOOL/recv"
|
|
|
|
log_must mkdir /$TESTPOOL/tar
|
|
log_must tar --directory /$TESTPOOL/tar -xzf $tarfile
|
|
log_must diff -r /$TESTPOOL/tar /$TESTPOOL/recv
|
|
|
|
log_pass "zfs can receive dedup send streams with 'zstream redup'"
|