aboutsummaryrefslogtreecommitdiffstats
path: root/include/sys/dmu_send.h
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2018-02-21 15:31:03 -0500
committerBrian Behlendorf <[email protected]>2018-02-21 12:31:03 -0800
commitb0918402dc9a0f81dd52880fbd4e4f4f2133764b (patch)
tree08bd4a79281aae8155e36047c3421420d77bdbbd /include/sys/dmu_send.h
parent4a385862b7a9c62f5ec46462e92db48c3c5ec7d9 (diff)
Raw receive should change key atomically
Currently, raw zfs sends transfer the encrypted master keys and objset_phys_t encryption parameters in the DRR_BEGIN payload of each send file. Both of these are processed as soon as they are read in dmu_recv_stream(), meaning that the new keys are set before the new snapshot is received. In addition to the fact that this changes the user's keys for the dataset earlier than they might expect, the keys were never reset to what they originally were in the event that the receive failed. This patch splits the processing into objset handling and key handling, the later of which is moved to dmu_recv_end() so that they key change can be done atomically. Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #7200
Diffstat (limited to 'include/sys/dmu_send.h')
-rw-r--r--include/sys/dmu_send.h1
1 files changed, 1 insertions, 0 deletions
diff --git a/include/sys/dmu_send.h b/include/sys/dmu_send.h
index 19d9a2d44..c0b2aafdb 100644
--- a/include/sys/dmu_send.h
+++ b/include/sys/dmu_send.h
@@ -64,6 +64,7 @@ typedef struct dmu_recv_cookie {
boolean_t drc_raw;
boolean_t drc_clone;
struct avl_tree *drc_guid_to_ds_map;
+ nvlist_t *drc_keynvl;
zio_cksum_t drc_cksum;
uint64_t drc_newsnapobj;
void *drc_owner;