]> git.proxmox.com Git - mirror_zfs.git/commit
Allow block cloning across encrypted datasets
authororomenahar <christianpe96@gmail.com>
Tue, 5 Dec 2023 19:03:48 +0000 (20:03 +0100)
committerGitHub <noreply@github.com>
Tue, 5 Dec 2023 19:03:48 +0000 (11:03 -0800)
commitc7b6119268b87ba16249550a64d28594185595fb
tree6321014fed61640db9dc8a252491a8c2468624a7
parent55b764e062b171874655c7ed51d6a45c2c243c0a
Allow block cloning across encrypted datasets

When two datasets share the same master encryption key, it is safe
to clone encrypted blocks. Currently only snapshots and clones
of a dataset share with it the same encryption key.

Added a test for:
- Clone from encrypted sibling to encrypted sibling with
  non encrypted parent
- Clone from encrypted parent to inherited encrypted child
- Clone from child to sibling with encrypted parent
- Clone from snapshot to the original datasets
- Clone from foreign snapshot to a foreign dataset
- Cloning from non-encrypted to encrypted datasets
- Cloning from encrypted to non-encrypted datasets

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Original-patch-by: Pawel Jakub Dawidek <pawel@dawidek.net>
Signed-off-by: Kay Pedersen <mail@mkwg.de>
Closes #15544
include/sys/dsl_crypt.h
man/man7/zpool-features.7
module/zfs/brt.c
module/zfs/dsl_crypt.c
module/zfs/zfs_vnops.c
tests/runfiles/linux.run
tests/test-runner/bin/zts-report.py.in
tests/zfs-tests/tests/Makefile.am
tests/zfs-tests/tests/functional/block_cloning/block_cloning.kshlib
tests/zfs-tests/tests/functional/block_cloning/block_cloning_cross_enc_dataset.ksh [new file with mode: 0755]