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:
+10
-10
@@ -463,11 +463,11 @@ code = '''
|
||||
[cases.test_kv_many]
|
||||
defines.N = [40, 400]
|
||||
defines.SIZE = 4
|
||||
defines.COMPACT = [false, true]
|
||||
defines.GC_FLAGS = 'LFS3_GC_COMPACT'
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.GC_FLAGS = 'LFS3_GC_COMPACTMETA'
|
||||
defines.GC_STEPS = -1
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
if = 'LFS3_IFDEF_GC(true, !COMPACT)'
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
if = 'LFS3_IFDEF_GC(true, !COMPACTMETA)'
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -489,7 +489,7 @@ code = '''
|
||||
|
||||
// try compacting?
|
||||
#ifdef LFS3_GC
|
||||
if (COMPACT) {
|
||||
if (COMPACTMETA) {
|
||||
lfs3_fs_gc(&lfs3) => 0;
|
||||
}
|
||||
#endif
|
||||
@@ -633,11 +633,11 @@ code = '''
|
||||
defines.N = 40
|
||||
# size is more an upper limit here
|
||||
defines.SIZE = 40000
|
||||
defines.COMPACT = [false, true]
|
||||
defines.GC_FLAGS = 'LFS3_GC_COMPACT'
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.GC_FLAGS = 'LFS3_GC_COMPACTMETA'
|
||||
defines.GC_STEPS = -1
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
if = 'LFS3_IFDEF_GC(true, !COMPACT)'
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
if = 'LFS3_IFDEF_GC(true, !COMPACTMETA)'
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -664,7 +664,7 @@ code = '''
|
||||
|
||||
// try compacting?
|
||||
#ifdef LFS3_GC
|
||||
if (COMPACT) {
|
||||
if (COMPACTMETA) {
|
||||
lfs3_fs_gc(&lfs3) => 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user