mirror of
https://github.com/versity/scoutfs.git
synced 2026-04-27 08:35:05 +00:00
To consistentely finalize an open_log_trees _get_log_trees commits a mostly empty copy of the current log_trees at the current nr with the finalized bit set. It then later commits the rest of the current log_trees at the next nr. Splitting this across two commits leaves a window where the persistent version of the items have lost references to some of the structures in the log_trees, particularly the allocators. If we were to crash in this window we'd lose all those structures. This is a conservative change that commits both the finalized current nr and the next nr in one commit. It avoids changing too much of the code flow to only fix this one problem. Signed-off-by: Zach Brown <zab@versity.com>