aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorTom Caputi <[email protected]>2019-09-25 20:02:33 -0400
committerBrian Behlendorf <[email protected]>2019-09-25 17:02:32 -0700
commitbb61cc31851098ab41a7dcb56333a90b40d65129 (patch)
treeec37bcf52d4e269d9ebd4a24696ee79215abf875 /include
parent479d7d3ca6c61dce789e54eb02c04b90f9ce0c8f (diff)
Fix encryption hierarchy issues with zfs recv -d
Currently, the recv_fix_encryption_hierarchy() function accepts 'destsnap' as one of its parameters. Originally, this was intended to be the top-level dataset of a receive (whether or not the receive was recursive). Unfortunately, this parameter actually is simply the input that is passed in from the command line. When the user specifies 'zfs recv -d', this string is actually only the name of the receiving pool since the rest of the name is derived from the send stream. This causes the function to fail, leaving some datasets with an invalid encryption hierarchy. This patch resolves this problem by passing in the top_zfs variable instead. In order to make this work, this patch also includes some changes that ensure the value is always present when we need it. Reviewed-by: loli10K <[email protected]> Reviewed-by: Brian Behlendorf <[email protected]> Signed-off-by: Tom Caputi <[email protected]> Closes #9273 Closes #9309
Diffstat (limited to 'include')
-rw-r--r--include/libzfs.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/libzfs.h b/include/libzfs.h
index bb0178eea..7828a2759 100644
--- a/include/libzfs.h
+++ b/include/libzfs.h
@@ -747,6 +747,9 @@ typedef struct recvflags {
/* skip receive of snapshot holds */
boolean_t skipholds;
+
+ /* mount the filesystem unless nomount is specified */
+ boolean_t domount;
} recvflags_t;
extern int zfs_receive(libzfs_handle_t *, const char *, nvlist_t *,