Dropped LFS_F_COMPACT flags from lfsr_format

The argument for this flag is pretty brittle. Yes it's _technically_
possible to end up with a compactable filesystem during lfsr_format, but
it's pretty unlikely. And keeping LFS_F_COMPACT around means we'd always
need the lfsr_mtree_gc circuitry in lfsr_format, for such a niche
situation, that can be easily cleaned up in lfsr_mount.

So dropping for now.

No code changes, but this does mean one less feature to support:

           code          stack          ctx
  before: 37804           2608          620
  after:  37804 (+0.0%)   2608 (+0.0%)  620 (+0.0%)
This commit is contained in:
Christopher Haster
2025-01-08 03:57:54 -06:00
parent 94e9cb5081
commit 1965593644
3 changed files with 4 additions and 10 deletions
+2 -5
View File
@@ -14141,7 +14141,6 @@ int lfsr_format(lfs_t *lfs, uint32_t flags,
| LFS_IFDEF_CKFETCHES(LFS_F_CKFETCHES, 0)
| LFS_IFDEF_CKPARITY(LFS_F_CKPARITY, 0)
| LFS_IFDEF_CKDATACKSUMS(LFS_F_CKDATACKSUMS, 0)
| LFS_F_COMPACT
| LFS_F_CKMETA
| LFS_F_CKDATA)) == 0);
// some flags don't make sense when only traversing the mtree
@@ -14179,14 +14178,12 @@ int lfsr_format(lfs_t *lfs, uint32_t flags,
// run gc if requested
if (flags & (
LFS_F_COMPACT
| LFS_F_CKMETA
LFS_F_CKMETA
| LFS_F_CKDATA)) {
lfsr_traversal_t t;
err = lfsr_fs_gc_(lfs, &t,
flags & (
LFS_F_COMPACT
| LFS_F_CKMETA
LFS_F_CKMETA
| LFS_F_CKDATA),
-1);
if (err) {