bmap: Recheckpoint the allocator after rebuilding the bmap

If before rebuilding the bmap is a valid checkpoint, after is too.

This lets us realloc any blocks that may have been temporarily allocated
when rebuilding the bmap. This probably doesn't matter much except for
low-storage states when blocks are extremely scarce, but allocator
checkpoints are cheap so better safe than sorry.

Code changes minimal (negative?):

                code          stack          ctx
  before:      37172           2352          684
  after:       37172 (+0.0%)   2352 (+0.0%)  684 (+0.0%)

                code          stack          ctx
  bmap before: 38852           2456          800
  bmap after:  38844 (-0.0%)   2456 (+0.0%)  800 (+0.0%)
This commit is contained in:
Christopher Haster
2025-10-04 12:12:29 -05:00
parent 052fc200c8
commit 92620d386f
+3
View File
@@ -11018,6 +11018,9 @@ static inline int lfs3_alloc_ckpoint(lfs3_t *lfs3) {
if (err) {
return err;
}
// checkpoint the allocator again
lfs3->lookahead.ckpoint = lfs3->block_count;
}
#endif
return 0;