mirror of
https://github.com/versity/scoutfs.git
synced 2026-07-29 03:23:13 +00:00
d91dc45368e8c66b88cc3058c62d7e804394deab
Add an interval tree that lets us efficiently discover intervals that overlap a given search region. We're going to need this now to sanely implementing merging and in the future to implement granting access ranges. It's easy to implement an interval tree by using the kernel's augmented rbtree to track the max end value of the subtree of intervals. The tricky bit is that the augmented interface assumes that it can directly compare the augmented value. If we were developing against mainline we'd just patch the interface. But we're developing against distro kernels that development partners deploy so the kernel is frozen in amber. We deploy a giant stinky hack to import a private tweaked version of the interface. It's isolated so we can trivially drop it once we merge with the fixed upstream interface. We also add some build time checks to make sure that we don't accidentally combine rb structures between the private import and the main kernel interface. Signed-off-by: Zach Brown <zab@versity.com>
Description
No description provided
6.9 MiB
Languages
C
86.4%
Shell
9.9%
Roff
2.5%
TeX
0.8%
Makefile
0.4%