From 11bdc5c8e8fb69c7cf66c103f0393024e9a247cb Mon Sep 17 00:00:00 2001 From: Tony Hutter Date: Tue, 24 Jan 2023 15:31:09 -0800 Subject: [PATCH] Revert "ztest fails assertion in zio_write_gang_member_ready()" This reverts commit 0156253d29a303bdcca3e535958e754d8f086e33. 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 --- module/zfs/zio.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/module/zfs/zio.c b/module/zfs/zio.c index 05f4bc65a5..c1fd2de2e5 100644 --- a/module/zfs/zio.c +++ b/module/zfs/zio.c @@ -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;