Renamed LFS3_T_COMPACTMETA -> LFS3_T_COMPACT (and gc_compact_thresh)
This effectively reverts 1f824a0:
- LFS3_T_COMPACTMETA -> LFS3_T_COMPACT
- gc_compactmeta_thresh -> gc_compact_thresh
And friends.
After using LFS3_T_COMPACTMETA for a bit, I think it just adds noise
without much value. Especially when next to LFS3_T_LOOKAHEAD,
LFS3_GC_PREERASE, LFS3_M_SYNC, etc.
It's interesting that we already have some very distinct verbs for this
sort of thing based on data type (compact => metadata, garbage-collect
=> disk, compress => data).
This commit is contained in:
+15
-15
@@ -910,11 +910,11 @@ code = '''
|
||||
defines.FILETYPE = [0, 1, 2, 3]
|
||||
defines.M = 40
|
||||
defines.SIZE = 4
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.GC_FLAGS = 'LFS3_GC_COMPACTMETA'
|
||||
defines.COMPACT = [false, true]
|
||||
defines.GC_FLAGS = 'LFS3_GC_COMPACT'
|
||||
defines.GC_STEPS = -1
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
if = 'LFS3_IFDEF_GC(true, !COMPACTMETA)'
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
if = 'LFS3_IFDEF_GC(true, !COMPACT)'
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -958,7 +958,7 @@ code = '''
|
||||
|
||||
// try compacting?
|
||||
#ifdef LFS3_GC
|
||||
if (COMPACTMETA) {
|
||||
if (COMPACT) {
|
||||
lfs3_fs_gc(&lfs3) => 0;
|
||||
}
|
||||
#endif
|
||||
@@ -1004,11 +1004,11 @@ defines.FILETYPE = [0, 1, 2]
|
||||
defines.N = 64
|
||||
defines.M = 4
|
||||
defines.SIZE = 4
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.GC_FLAGS = 'LFS3_GC_COMPACTMETA'
|
||||
defines.COMPACT = [false, true]
|
||||
defines.GC_FLAGS = 'LFS3_GC_COMPACT'
|
||||
defines.GC_STEPS = -1
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
if = 'LFS3_IFDEF_GC(true, !COMPACTMETA)'
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
if = 'LFS3_IFDEF_GC(true, !COMPACT)'
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -1055,7 +1055,7 @@ code = '''
|
||||
|
||||
// try compacting?
|
||||
#ifdef LFS3_GC
|
||||
if (COMPACTMETA) {
|
||||
if (COMPACT) {
|
||||
lfs3_fs_gc(&lfs3) => 0;
|
||||
}
|
||||
#endif
|
||||
@@ -5041,11 +5041,11 @@ code = '''
|
||||
defines.N = 64
|
||||
defines.M = 4
|
||||
defines.SIZE = 4
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.GC_FLAGS = 'LFS3_GC_COMPACTMETA'
|
||||
defines.COMPACT = [false, true]
|
||||
defines.GC_FLAGS = 'LFS3_GC_COMPACT'
|
||||
defines.GC_STEPS = -1
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
if = 'LFS3_IFDEF_GC(true, !COMPACTMETA)'
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
if = 'LFS3_IFDEF_GC(true, !COMPACT)'
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -5083,7 +5083,7 @@ code = '''
|
||||
|
||||
// try compacting?
|
||||
#ifdef LFS3_GC
|
||||
if (COMPACTMETA) {
|
||||
if (COMPACT) {
|
||||
lfs3_fs_gc(&lfs3) => 0;
|
||||
}
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user