Revert "ztest fails assertion in zio_write_gang_member_ready()"

This reverts commit 0156253d29.

That commit was identified as causing IO errors on a user's
encrypted dataset:
https://github.com/openzfs/zfs/issues/14413

Signed-off-by: Tony Hutter <hutter2@llnl.gov>
This commit is contained in:
Tony Hutter 2023-01-24 15:31:09 -08:00
parent 04b02785b6
commit 11bdc5c8e8
1 changed files with 1 additions and 1 deletions

View File

@ -2827,7 +2827,7 @@ zio_write_gang_block(zio_t *pio, metaslab_class_t *mc)
* have a third copy.
*/
gbh_copies = MIN(copies + 1, spa_max_replication(spa));
if (BP_IS_ENCRYPTED(bp) && gbh_copies >= SPA_DVAS_PER_BP)
if (gio->io_prop.zp_encrypt && gbh_copies >= SPA_DVAS_PER_BP)
gbh_copies = SPA_DVAS_PER_BP - 1;
int flags = METASLAB_HINTBP_FAVOR | METASLAB_GANG_HEADER;