Zach Brown 0988cbe1e9 scoutfs: track old and cur dirty btree blocks
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>
2019-05-21 11:41:07 -07:00
Description
No description provided
8 MiB
Languages
C 87%
Shell 9.3%
Roff 2.5%
TeX 0.8%
Makefile 0.4%