mirror of
https://github.com/versity/scoutfs.git
synced 2026-02-08 03:30:46 +00:00
0988cbe1e9fa3bc6c7a0eca46e234b971ee3c29b
To avoid overwriting live btree blocks we have to migrate them between halves of the ring. Each time we cross into a new half of the ring we start migration all over again. The intent was to slowly migrate the blocks over time. We'd track dirty blocks that came from the old and current halves and keep them in balance. This would keep the overhead of the migration low and spread out through all at the start of the half that include migration. But the calculation of current blocks was completely wrong. It checked the newly allocated block which is always in the current half. It never thought it was dirtying old blocks so it'd constantly migrate trying to find them. We'd effectively migrate every btree block during the first transaction in each half. This calculates if we're dirtying old or new blocks by the source of the cow operation. We now recognize when we dirty old blocks and will stop migrating once we've migrated at least as many old blocks as we've written new blocks. Signed-off-by: Zach Brown <zab@versity.com>
Description
No description provided
Languages
C
87%
Shell
9.3%
Roff
2.5%
TeX
0.8%
Makefile
0.4%