aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authororomenahar <[email protected]>2023-12-05 20:03:48 +0100
committerGitHub <[email protected]>2023-12-05 11:03:48 -0800
commitc7b6119268b87ba16249550a64d28594185595fb (patch)
tree6321014fed61640db9dc8a252491a8c2468624a7 /include
parent55b764e062b171874655c7ed51d6a45c2c243c0a (diff)
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 <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Original-patch-by: Pawel Jakub Dawidek <[email protected]> Signed-off-by: Kay Pedersen <[email protected]> Closes #15544
Diffstat (limited to 'include')
-rw-r--r--include/sys/dsl_crypt.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/dsl_crypt.h b/include/sys/dsl_crypt.h
index 72716e296..fbcae3715 100644
--- a/include/sys/dsl_crypt.h
+++ b/include/sys/dsl_crypt.h
@@ -206,6 +206,7 @@ void dsl_dataset_promote_crypt_sync(dsl_dir_t *target, dsl_dir_t *origin,
dmu_tx_t *tx);
int dmu_objset_create_crypt_check(dsl_dir_t *parentdd,
dsl_crypto_params_t *dcp, boolean_t *will_encrypt);
+boolean_t dmu_objset_crypto_key_equal(objset_t *osa, objset_t *osb);
void dsl_dataset_create_crypt_sync(uint64_t dsobj, dsl_dir_t *dd,
struct dsl_dataset *origin, dsl_crypto_params_t *dcp, dmu_tx_t *tx);
uint64_t dsl_crypto_key_create_sync(uint64_t crypt, dsl_wrapping_key_t *wkey,