Renamed LFS3_T_COMPACT -> LFS3_T_COMPACTMETA (and gc_compactmeta_thresh)

- LFS3_T_COMPACT -> LFS3_T_COMPACTMETA
- gc_compact_thresh -> gc_compactmeta_thresh

And friends:

  LFS3_M_COMPACTMETA   0x00000800  Compact metadata logs
  LFS3_GC_COMPACTMETA  0x00000800  Compact metadata logs
  LFS3_I_COMPACTMETA   0x00000800  Filesystem may have uncompacted metadata
  LFS3_T_COMPACTMETA   0x00000800  Compact metadata logs

---

This does two things:

1. Highlights that LFS3_T_COMPACTMETA only interacts with metadata logs,
   and has no effect on data blocks.

2. Better matches the verb+noun names used for other gc/traversal flags
   (REPOPGBMAP, CKMETA, etc).

It is a bit more of a mouthful, but I'm not sure that's entirely a bad
thing. These are pretty low-level flags.
This commit is contained in:
Christopher Haster
2025-10-16 14:51:25 -05:00
parent 9bdfb25a09
commit 1f824a029b
10 changed files with 395 additions and 391 deletions
+20 -20
View File
@@ -116,7 +116,7 @@ void bench_permutation(size_t i, uint32_t *buffer, size_t size);
BENCH_DEFINE(LOOKAHEAD_SIZE, 16 ) \
BENCH_DEFINE(GC_FLAGS, 0 ) \
BENCH_DEFINE(GC_STEPS, 0 ) \
BENCH_DEFINE(GC_COMPACT_THRESH, 0 ) \
BENCH_DEFINE(GC_COMPACTMETA_THRESH, 0 ) \
BENCH_DEFINE(SHRUB_SIZE, BLOCK_SIZE/4 ) \
BENCH_DEFINE(FRAGMENT_SIZE, LFS3_MIN(BLOCK_SIZE/8, 512) ) \
BENCH_DEFINE(CRYSTAL_THRESH, BLOCK_SIZE/8 ) \
@@ -136,20 +136,20 @@ void bench_permutation(size_t i, uint32_t *buffer, size_t size);
// map defines to cfg struct fields
#define BENCH_CFG \
.read_size = READ_SIZE, \
.prog_size = PROG_SIZE, \
.block_size = BLOCK_SIZE, \
.block_count = BLOCK_COUNT, \
.block_recycles = BLOCK_RECYCLES, \
.rcache_size = RCACHE_SIZE, \
.pcache_size = PCACHE_SIZE, \
.file_cache_size = FILE_CACHE_SIZE, \
.lookahead_size = LOOKAHEAD_SIZE, \
BENCH_GBMAP_CFG \
BENCH_GC_CFG \
.gc_compact_thresh = GC_COMPACT_THRESH, \
.shrub_size = SHRUB_SIZE, \
.fragment_size = FRAGMENT_SIZE, \
.read_size = READ_SIZE, \
.prog_size = PROG_SIZE, \
.block_size = BLOCK_SIZE, \
.block_count = BLOCK_COUNT, \
.block_recycles = BLOCK_RECYCLES, \
.rcache_size = RCACHE_SIZE, \
.pcache_size = PCACHE_SIZE, \
.file_cache_size = FILE_CACHE_SIZE, \
.lookahead_size = LOOKAHEAD_SIZE, \
BENCH_GBMAP_CFG \
BENCH_GC_CFG \
.gc_compactmeta_thresh = GC_COMPACTMETA_THRESH, \
.shrub_size = SHRUB_SIZE, \
.fragment_size = FRAGMENT_SIZE, \
.crystal_thresh = CRYSTAL_THRESH,
#ifdef LFS3_GBMAP
@@ -161,17 +161,17 @@ void bench_permutation(size_t i, uint32_t *buffer, size_t size);
#ifdef LFS3_GC
#define BENCH_GC_CFG \
.gc_flags = GC_FLAGS, \
.gc_flags = GC_FLAGS, \
.gc_steps = GC_STEPS,
#else
#define BENCH_GC_CFG
#endif
#define BENCH_BDCFG \
.erase_value = ERASE_VALUE, \
.erase_cycles = ERASE_CYCLES, \
.badblock_behavior = BADBLOCK_BEHAVIOR, \
.powerloss_behavior = POWERLOSS_BEHAVIOR, \
.erase_value = ERASE_VALUE, \
.erase_cycles = ERASE_CYCLES, \
.badblock_behavior = BADBLOCK_BEHAVIOR, \
.powerloss_behavior = POWERLOSS_BEHAVIOR, \
.seed = EMUBD_SEED,