mirror_zfs/module
Attila Fülöp 68ddc06b61
Receive checks should allow unencrypted child datasets
dmu_recv_begin_check() unconditionally sets the DS_HOLD_FLAG_DECRYPT
flag before calling dsl_dataset_hold_flags(). If the key on the
receiving side isn't loaded or the send stream contains embedded
blocks, the receive check fails for a stream which is perfectly
valid and could be received without any problem. This seems like
a remnant of the initial design, where unencrypted datasets below
encrypted ones weren't allowed.

Add a condition to set `DS_HOLD_FLAG_DECRYPT` only for encrypted
datasets, modify an existing test to detect this regression and add
a test for raw replication streams.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed-by: George Amanakis <gamanakis@gmail.com>
Co-authored-by: George Amanakis <gamanakis@gmail.com>
Signed-off-by: Attila Fülöp <attila@fueloep.org>
Closes #13033 
Closes #13076
2022-02-09 14:38:33 -08:00
..
avl Clean up CSTYLEDs 2022-01-26 11:38:52 -08:00
icp Rename EMPTY_TASKQ into taskq_empty 2022-02-09 15:04:26 -07:00
lua Clean up CSTYLEDs 2022-01-26 11:38:52 -08:00
nvpair module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
os Rename EMPTY_TASKQ into taskq_empty 2022-02-09 15:04:26 -07:00
spl Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
unicode module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
zcommon Linux 5.16 compat: don't use XSTATE_XSAVE to save FPU state 2022-02-09 12:50:10 -08:00
zfs Receive checks should allow unencrypted child datasets 2022-02-09 14:38:33 -08:00
zstd Add --enable-asan and --enable-ubsan switches 2022-02-03 14:35:38 -08:00
.gitignore Cleanup linux module kbuild files 2020-06-10 09:24:15 -07:00
Kbuild.in Add zstd support to zfs 2020-08-20 10:30:06 -07:00
Makefile.bsd Updated the lz4 decompressor 2022-01-07 10:36:49 -08:00
Makefile.in Add support for $KERNEL_{CC,LD,LLVM} variables 2022-02-09 13:24:22 -08:00