From a157ef62a16814459f925f14fe1b759bd4f8338d Mon Sep 17 00:00:00 2001 From: Mariusz Zaborski Date: Tue, 27 Jan 2026 03:33:21 +0100 Subject: [PATCH] Make sure we can still write data to txg The final txgs are used only to clear out any remaining deferred frees, and we cannot write new data to them. Make sure we do not try to do so. Reviewed-by: Alexander Motin Signed-off-by: Mariusz Zaborski Closes #18139 --- module/zfs/spa.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/module/zfs/spa.c b/module/zfs/spa.c index b9924d33c..6c0ef0656 100644 --- a/module/zfs/spa.c +++ b/module/zfs/spa.c @@ -2167,6 +2167,9 @@ spa_sync_time_logger(spa_t *spa, uint64_t txg) if (curtime < spa->spa_last_flush_txg_time + spa_flush_txg_time) { return; } + if (txg > spa_final_dirty_txg(spa)) { + return; + } spa->spa_last_flush_txg_time = curtime; tx = dmu_tx_create_assigned(spa_get_dsl(spa), txg);