Skip to content

Commit 46095ae

Browse files
committed
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. Signed-off-by: Mariusz Zaborski <mariusz.zaborski@klarasystems.com>
1 parent cd895f0 commit 46095ae

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

module/zfs/spa.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2167,6 +2167,9 @@ spa_sync_time_logger(spa_t *spa, uint64_t txg)
21672167
if (curtime < spa->spa_last_flush_txg_time + spa_flush_txg_time) {
21682168
return;
21692169
}
2170+
if (txg > spa_final_dirty_txg(spa)) {
2171+
return;
2172+
}
21702173
spa->spa_last_flush_txg_time = curtime;
21712174

21722175
tx = dmu_tx_create_assigned(spa_get_dsl(spa), txg);

0 commit comments

Comments
 (0)