HomeFreeBSD

Fix clone handling with encryption roots

Description

Fix clone handling with encryption roots

Currently, spa_keystore_change_key_sync_impl() does not recurse
into clones when updating encryption roots for either a call to
'zfs promote' or 'zfs change-key'. This can cause children of
these clones to end up in a state where they point to the wrong
dataset as the encryption root. It can also trigger ASSERTs in
some cases where the code checks reference counts on wrapping
keys. This patch fixes this issue by ensuring that this function
properly recurses into clones during processing.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: Alek Pinchuk <apinchuk@datto.com>
Signed-off-by: Tom Caputi <tcaputi@datto.com>
Closes #9267
Closes #9294

Details

Provenance
Tom Caputi <tcaputi@datto.com>Authored on Sep 16 2019, 5:07 PM
Brian Behlendorf <behlendorf1@llnl.gov>Committed on Sep 16 2019, 5:07 PM
Parents
rG2a0d41889e1c: Scrubbing root pools may deadlock on kernels without elevator_change() (#9321)
Branches
Unknown
Tags
Unknown

Event Timeline

Brian Behlendorf <behlendorf1@llnl.gov> committed rG637f0c6019a6: Fix clone handling with encryption roots (authored by Tom Caputi <tcaputi@datto.com>).Sep 16 2019, 5:07 PM