Dropped special LFSR_MID_RM mid
This is mostly to make it easier to merge mids/rids. Having a special constant here is tricky when the mid/rid split point is dynamic. Currently using rbyd.trunk=0 to indicate when an mdir is dropped. This is nice as it preserves the last mid/rid, which is needed by the readdir code, and it implicitly returns NOENT to all queries in lfsr_rbyd_lookup.
This commit is contained in:
+1
-1
@@ -147,7 +147,7 @@ code = '''
|
||||
lfsr_mdir_t mdir;
|
||||
lfsr_mtree_lookup(&lfs, mid, -1, &mdir) => 0;
|
||||
for (mdir.rid = 0;
|
||||
mdir.rid < (lfs_ssize_t)lfsr_mdir_weight(&mdir);
|
||||
mdir.rid < (lfs_ssize_t)mdir.m.rbyd.weight;
|
||||
mdir.rid++) {
|
||||
uint8_t buffer[4];
|
||||
lfsr_mdir_get(&lfs, &mdir, mdir.rid, LFSR_TAG_INLINED,
|
||||
|
||||
Reference in New Issue
Block a user