t: Fixed missing lfs_alloc_ckpoint in manual btree compaction

Whoops! Turns out it's easy to forget to checkpoint the allocator when
most standalone operations involve lfsr_mdir_commit which checkpoints
the allocator automatically...

This is also the only case where we are doing btree modifications
outside of either file operations or mtree updates.

Easy fix, code changes minimal:

           code          stack
  before: 36280           2680
  after:  36288 (+0.0%)   2680 (+0.0%)
This commit is contained in:
Christopher Haster
2024-07-15 16:08:27 -05:00
parent 2f08662fb9
commit 83f2a3c7fc
+3
View File
@@ -8785,6 +8785,9 @@ dropped:;
// compactions to work correctly
LFS_ASSERT(lfsr_omdir_isopen(lfs, &t->o.o));
// checkpoint the allocator
lfs_alloc_ckpoint(lfs);
if (t->o.o.state == LFSR_TSTATE_MTREE) {
err = lfsr_btree_compact_(lfs, &t->o.bshrub.u.btree,
// note we may be referencing the btree root here