From 76bd31ccc3f74d46003f7a86a1ebd9d543e9a0cb Mon Sep 17 00:00:00 2001 From: George Wilson Date: Wed, 8 Dec 2021 12:31:02 -0600 Subject: [PATCH] DOSE-819 Panic on object store just after domain0 creation (#52) --- module/zfs/spa.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/module/zfs/spa.c b/module/zfs/spa.c index eba2ad610ab0..9c5b8aade5c5 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -9202,7 +9202,7 @@ spa_sync_iterate_to_convergence(spa_t *spa, dmu_tx_t *tx) uint64_t txg = tx->tx_txg; bplist_t *free_bpl = &spa->spa_free_bplist[txg & TXG_MASK]; - if (spa_is_object_based(spa)) { + if (spa_is_object_based(spa) && txg <= spa_final_dirty_txg(spa)) { spa_sync_restore_mos_stats(spa); } @@ -9276,7 +9276,7 @@ spa_sync_iterate_to_convergence(spa_t *spa, dmu_tx_t *tx) spa_sync_deferred_frees(spa, tx); } while (dmu_objset_is_dirty(mos, txg)); - if (spa_is_object_based(spa)) { + if (spa_is_object_based(spa) && txg <= spa_final_dirty_txg(spa)) { spa_sync_save_mos_stats(spa); }