]> git.proxmox.com Git - mirror_zfs.git/commit
Implement a new type of zfs receive: corrective receive (-c)
authorAlek P <alek-p@users.noreply.github.com>
Thu, 28 Jul 2022 22:52:46 +0000 (18:52 -0400)
committerGitHub <noreply@github.com>
Thu, 28 Jul 2022 22:52:46 +0000 (15:52 -0700)
commite8cf3a4f7662f2d1c13684ce52b73ab0d9a12266
treefb348e3b67a8b29e11cf659d69957182397991a8
parent5fae33e04771e255f3dba57263fd06eb68bd38b5
Implement a new type of zfs receive: corrective receive (-c)

This type of recv is used to heal corrupted data when a replica
of the data already exists (in the form of a send file for example).
With the provided send stream, corrective receive will read from
disk blocks described by the WRITE records. When any of the reads
come back with ECKSUM we use the data from the corresponding WRITE
record to rewrite the corrupted block.

Reviewed-by: Paul Dagnelie <pcd@delphix.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Paul Zuchowski <pzuchowski@datto.com>
Signed-off-by: Alek Pinchuk <apinchuk@axcient.com>
Closes #9372
28 files changed:
cmd/zfs/zfs_main.c
contrib/pyzfs/libzfs_core/__init__.py
contrib/pyzfs/libzfs_core/_error_translation.py
contrib/pyzfs/libzfs_core/_libzfs_core.py
contrib/pyzfs/libzfs_core/bindings/libzfs_core.py
contrib/pyzfs/libzfs_core/test/test_libzfs_core.py
include/libzfs.h
include/libzfs_core.h
include/sys/dmu_recv.h
include/sys/spa.h
include/sys/spa_impl.h
include/sys/zio.h
lib/libzfs/libzfs_sendrecv.c
lib/libzfs_core/libzfs_core.abi
lib/libzfs_core/libzfs_core.c
man/man4/zfs.4
man/man8/zfs-receive.8
module/zfs/dmu.c
module/zfs/dmu_recv.c
module/zfs/spa.c
module/zfs/spa_errlog.c
module/zfs/zfs_ioctl.c
module/zfs/zio.c
tests/runfiles/common.run
tests/zfs-tests/cmd/libzfs_input_check.c
tests/zfs-tests/tests/Makefile.am
tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_compressed_corrective.ksh [new file with mode: 0755]
tests/zfs-tests/tests/functional/cli_root/zfs_receive/zfs_receive_corrective.ksh [new file with mode: 0755]