Skip to content

Commit

Permalink
Assert if we're logging after final txg was set
Browse files Browse the repository at this point in the history
This change was developed under this PR:

#16795

Signed-off-by: Pavel Snajdr <[email protected]>
  • Loading branch information
amotin authored and snajpa committed Nov 21, 2024
1 parent ff3df12 commit 6539e23
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions module/zfs/spa_history.c
Original file line number Diff line number Diff line change
Expand Up @@ -535,6 +535,9 @@ log_internal(nvlist_t *nvl, const char *operation, spa_t *spa,
fnvlist_add_uint64(nvl, ZPOOL_HIST_TXG, tx->tx_txg);
fnvlist_add_uint64(nvl, ZPOOL_HIST_TIME, gethrestime_sec());

VERIFY3UF(tx->tx_txg, <=, spa_final_dirty_txg(spa),
"Logged after final txg was set: %s %s", operation, fmt);

if (dmu_tx_is_syncing(tx)) {
spa_history_log_sync(nvl, tx);
} else {
Expand Down

0 comments on commit 6539e23

Please sign in to comment.