You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The mechanism itself is a bit hacky and has caused multiple failures in the past. Most of them looked like #9186 (metaslab_condense_wanted was set in the last TXGs accidentally dirtying the metaslab for subsequent TXGs) and since have been fixed by Paul's change (#9231). Unfortunately these are not the only failures that we've seen historically though related to spa_final_txg.
/*
* Return the last txg where data can be dirtied. The final txgs
* will be used to just clear out any deferred frees that remain.
*/
uint64_t
spa_final_dirty_txg(spa_t *spa)
{
return (spa->spa_final_txg - TXG_DEFER_SIZE);
}
The problem is that spa_export_common() will most probably call spa_unload() which itself calls txg_wait_synced() a lot of times through other functions and can easily force the SPA to go beyond spa_final_txg. Functions within spa_unload() that have been added over time that do that are the following: spa_unload_log_sm_flush_all(), vdev_initialize_stop_all(), vdev_trim_stop_all(), vdev_autotrim_stop_all().
This discussion was converted from issue #9281 on December 21, 2020 21:10.
Heading
Bold
Italic
Quote
Code
Link
Numbered list
Unordered list
Task list
Attach files
Mention
Reference
Menu
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
The mechanism itself is a bit hacky and has caused multiple failures in the past. Most of them looked like #9186 (
metaslab_condense_wanted
was set in the last TXGs accidentally dirtying the metaslab for subsequent TXGs) and since have been fixed by Paul's change (#9231). Unfortunately these are not the only failures that we've seen historically though related tospa_final_txg
.The variable is set in
spa_export_common()
:and generally checked through this wrapper:
The problem is that
spa_export_common()
will most probably callspa_unload()
which itself callstxg_wait_synced()
a lot of times through other functions and can easily force the SPA to go beyondspa_final_txg
. Functions withinspa_unload()
that have been added over time that do that are the following:spa_unload_log_sm_flush_all()
,vdev_initialize_stop_all()
,vdev_trim_stop_all()
,vdev_autotrim_stop_all()
.Beta Was this translation helpful? Give feedback.
All reactions