mirror_zfs/module
George Amanakis 52a36bd41a
Enable encrypted raw sending to pools with greater ashift
Raw sending from pool1/encrypted with ashift=9 to pool2/encrypted with
ashift=12 results to failure when mounting pool2/encrypted (Input/Output
error). Notably, the opposite, raw sending from a greater ashift to a
lower one does not fail.

This happens because zio_compress_write() falsely checks only
ZIO_FLAG_RAW_COMPRESS and not ZIO_FLAG_RAW_ENCRYPT which is also set in
encrypted raw send streams. In this case it rounds up the psize and if
not equal to the zio->io_size it modifies the block by zeroing out
the extra bytes. Because this happens in a SA attr. registration object
(type=46), the decryption fails upon mounting the filesystem, and zpool
status falsely reports an error.

Fix this by checking both ZIO_FLAG_RAW_COMPRESS and ZIO_FLAG_RAW_ENCRYPT
before deciding whether to zero-pad a block.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: George Amanakis <gamanakis@gmail.com>
Closes #13067 
Closes #13074
2022-02-16 11:52:02 -08:00
..
avl Clean up CSTYLEDs 2022-01-26 11:38:52 -08:00
icp module: icp: remove provider stats 2022-02-15 16:26:08 -08:00
lua Rename fallthrough to zfs_fallthrough 2022-02-15 08:58:59 -08:00
nvpair module/*.ko: prune .data, global .rodata 2022-01-14 15:37:55 -08:00
os Cross-platform xattr user namespace compatibility 2022-02-15 16:35:30 -08: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 Enable encrypted raw sending to pools with greater ashift 2022-02-16 11:52:02 -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