Added a very rough implementation of mdir drops

mdirs behave a bit differently than btree nodes here. When an mdir's
weight drops to zero, we eagerly drop the mdir. Unfortunately this
introduce a large number of conditions into lfsr_mdir_commit. Maybe
there's some different way to structure to code to avoid this...

Also expanded mtree tests to cover more corner cases, these are
desperately for any confidence that mdir drops work.
This commit is contained in:
Christopher Haster
2023-05-11 16:22:11 -05:00
parent ea28413eb2
commit 6bc85375ea
3 changed files with 657 additions and 273 deletions
+1
View File
@@ -371,6 +371,7 @@ typedef union lfsr_btree {
} lfsr_btree_t;
typedef struct lfsr_mdir {
// -3 => deleted
// -2 => an out-of-tree mdir
// -1 => mroot
// >=0 => bid in the mtree