mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-27 18:43:13 +00:00
Previously we had stubbed out the btree item API with static inlines. Those are replaced with real functions in a reasonably functional btree implementation. The btree implementation itself is pretty straight forward. Operations are performed top-down and we dirty, lock, and split/merge blocks as we go. Callers are given a cursor to give them full access to the item. Items in the btree blocks are stored in a treap. There are a lot of comments in the code to help make things clear. We add the notion of block references and some block functions for reading and dirtying blocks by reference. This passes tests up to the point where unmount tries to write out data and the world catches fire. That's far enough to commit what we have and iterate from there. Signed-off-by: Zach Brown <zab@versity.com>