mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-26 01:52:57 +00:00
9f885b4c12cdb0b43ab83fe74886d80cf4faa6c5
The item cache was getting inconsistent as items were removed. This would manifest in failing to find dirty items that it had counted as it was writing items into the segment and removing deletion items. For a start it wasn't using the augmented rb_erase(). We make a function that everyone uses. There's no augmented rb_replace() so We just augment erase, restart, and insert. (We could probably augment on descent and replace/propagate but that can come later.) Then the augmentation callbacks got the semantics slightly wrong. The rotation callback is named after a caller that happens to use it, not on any implied relationship between the nodes. It actually just recalculates the augmentation value for the two subtrees. Mischief managed. (We'll probably rework the augmentation so the value is for the node and its children and we can get rid of the extra code we have today to support our augmentation value that is sensitive to the difference between the left and write subtrees.) Signed-off-by: Zach Brown <zab@versity.com>
Description
No description provided
6.9 MiB
Languages
C
86.3%
Shell
10%
Roff
2.5%
TeX
0.8%
Makefile
0.4%