Files
mirror_zfs/module/zfs
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
..
2022-03-15 15:13:42 -07:00
2023-01-09 10:45:17 -08:00
2022-03-15 15:13:42 -07:00
2022-10-20 11:57:15 -07:00
2022-10-29 13:05:11 -07:00
2023-01-04 17:29:54 -07:00
2023-01-04 17:29:54 -07:00
2023-01-04 17:29:54 -07:00
2023-01-04 17:29:54 -07:00
2022-12-13 17:29:21 -08:00
2022-03-15 15:13:42 -07:00
2022-03-15 15:13:42 -07:00
2022-01-07 10:36:49 -08:00
2022-01-12 16:14:36 -08:00
2019-06-19 09:48:12 -07:00
2022-10-12 11:25:18 -07:00
2022-09-30 15:34:39 -07:00
2022-03-15 15:13:42 -07:00
2022-10-27 09:54:54 -07:00
2022-10-20 11:57:15 -07:00
2022-10-20 11:57:15 -07:00
2022-09-02 13:31:19 -07:00
2022-10-29 13:05:11 -07:00
2022-11-03 10:17:17 -07:00
2022-10-28 09:49:20 -07:00
2022-11-29 09:26:03 -08:00
2022-10-28 09:49:20 -07:00