Skip to content

Commit

Permalink
Fix encryption root hierarchy issue
Browse files Browse the repository at this point in the history
After doing a recursive raw receive, zfs userspace performs
a final pass to adjust the encryption root hierarchy as
needed. Unfortunately, the FORCE_INHERIT ioctl had a bug
which caused the encryption root to always be assigned to
the direct parent instead of the inheriting parent. This
patch simply fixes this issue.

Reviewed-by: Brian Behlendorf <[email protected]>
Reviewed-by: Alek Pinchuk <[email protected]>
Signed-off-by: Tom Caputi <[email protected]>
Closes openzfs#6847
Closes openzfs#6848
  • Loading branch information
Tom Caputi authored and Nasf-Fan committed Jan 29, 2018
1 parent f6774f5 commit 21092a0
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion module/zfs/dsl_crypt.c
Original file line number Diff line number Diff line change
Expand Up @@ -1454,7 +1454,8 @@ spa_keystore_change_key_sync(void *arg, dmu_tx_t *tx)
0, 0, NULL, tx);

rddobj = ds->ds_dir->dd_object;
new_rddobj = ds->ds_dir->dd_parent->dd_object;
VERIFY0(dsl_dir_get_encryption_root_ddobj(ds->ds_dir->dd_parent,
&new_rddobj));
}

if (wkey == NULL) {
Expand Down

0 comments on commit 21092a0

Please sign in to comment.