mirror_zfs/module
Matthew Ahrens 40d7e971ff
ztest fails assertion in zio_write_gang_member_ready()
Encrypted blocks can have up to 2 DVA's, as the third DVA is reserved
for the salt+IV.  However, dmu_write_policy() allows non-encrypted
blocks (e.g. DMU_OT_OBJSET) inside encrypted datasets to request and
allocate 3 DVA's, since they don't need a salt+IV (they are merely
authenicated).

However, if such a block becomes a gang block, the gang code incorrectly
limits the gang block header to 2 DVA's.  This leads to a "NDVAs
inversion", where a parent block (the gang block header) has less DVA's
than its children (the gang members), causing an assertion failure in
zio_write_gang_member_ready().

This commit addresses the problem by only restricting the gang block
header to 2 DVA's if the block is actually encrypted (and thus its gang
block members can have at most 2 DVA's).

Reviewed-by: Richard Yao <richard.yao@alumni.stonybrook.edu>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Matthew Ahrens <mahrens@delphix.com>
Closes #14250
Closes #14356
2023-01-09 16:43:45 -08:00
..
avl Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
icp Fix Clang 15 compilation errors 2022-11-30 13:46:26 -08:00
lua Fix Clang 15 compilation errors 2022-11-30 13:46:26 -08:00
nvpair Replace dead opensolaris.org license link 2022-07-11 14:16:13 -07:00
os linux 6.2 compat: get_acl() got moved to get_inode_acl() in 6.2 2023-01-06 14:40:54 -08:00
unicode Illumos #15286: do_composition() needs sign awareness 2023-01-05 11:16:21 -08:00
zcommon Micro-optimize fletcher4 calculations 2022-12-05 11:00:34 -08:00
zfs ztest fails assertion in zio_write_gang_member_ready() 2023-01-09 16:43:45 -08:00
zstd zstd: Refactor prefetching for the decoding loop 2022-11-29 10:05:30 -08:00
.gitignore FreeBSD: Ignore symlink to i386 includes 2022-08-02 16:34:23 -07:00
Kbuild.in Fix Clang 15 compilation errors 2022-11-30 13:46:26 -08:00
Makefile.bsd Cleanup dead spa_boot code 2022-09-13 16:40:10 -07:00
Makefile.in autoconf: use include directives instead of recursing down lib 2022-05-10 10:18:11 -07:00