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:
+86
-86
@@ -538,20 +538,20 @@ code = '''
|
||||
'''
|
||||
|
||||
|
||||
# test that compactmeta can make progress in isolation
|
||||
[cases.test_gc_compactmeta_progress]
|
||||
# test that compact can make progress in isolation
|
||||
[cases.test_gc_compact_progress]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
LFS3_GC_COMPACTMETA
|
||||
LFS3_GC_COMPACT
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
defines.SIZE = [
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
@@ -571,14 +571,14 @@ code = '''
|
||||
|
||||
uint32_t prng = 42;
|
||||
|
||||
// write to our mdir until >gc_compactmeta_thresh full
|
||||
// write to our mdir until >gc_compact_thresh full
|
||||
lfs3_file_t file;
|
||||
lfs3_file_open(&lfs3, &file, "jellyfish",
|
||||
LFS3_O_RDWR | LFS3_O_CREAT | LFS3_O_EXCL) => 0;
|
||||
|
||||
// hack, don't use the internals like this
|
||||
uint8_t wbuf[SIZE];
|
||||
while ((file.b.h.mdir.r.eoff & 0x7fffffff) <= GC_COMPACTMETA_THRESH) {
|
||||
while ((file.b.h.mdir.r.eoff & 0x7fffffff) <= GC_COMPACT_THRESH) {
|
||||
lfs3_file_rewind(&lfs3, &file) => 0;
|
||||
for (lfs3_size_t j = 0; j < SIZE; j++) {
|
||||
wbuf[j] = 'a' + (TEST_PRNG(&prng) % 26);
|
||||
@@ -590,7 +590,7 @@ code = '''
|
||||
// expect dirty initial state or else our test doesn't work
|
||||
struct lfs3_fsinfo fsinfo;
|
||||
lfs3_fs_stat(&lfs3, &fsinfo) => 0;
|
||||
assert(fsinfo.flags & LFS3_I_COMPACTMETA);
|
||||
assert(fsinfo.flags & LFS3_I_COMPACT);
|
||||
assert(lfs3.handles != &lfs3.gc.t.h);
|
||||
|
||||
// run GC until we make progress
|
||||
@@ -601,13 +601,13 @@ code = '''
|
||||
lfs3_fs_gc(&lfs3) => 0;
|
||||
|
||||
lfs3_fs_stat(&lfs3, &fsinfo) => 0;
|
||||
if (!(fsinfo.flags & LFS3_I_COMPACTMETA)) {
|
||||
if (!(fsinfo.flags & LFS3_I_COMPACT)) {
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
||||
// mdir should have been compacted
|
||||
assert((file.b.h.mdir.r.eoff & 0x7fffffff) <= GC_COMPACTMETA_THRESH);
|
||||
assert((file.b.h.mdir.r.eoff & 0x7fffffff) <= GC_COMPACT_THRESH);
|
||||
|
||||
// check we can still read the file
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -629,19 +629,19 @@ code = '''
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
|
||||
# test that compactmeta dirtying still works with the GC API
|
||||
[cases.test_gc_compactmeta_mutation]
|
||||
# test that compact dirtying still works with the GC API
|
||||
[cases.test_gc_compact_mutation]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
LFS3_GC_COMPACTMETA
|
||||
LFS3_GC_COMPACT
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
defines.SIZE = [
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
@@ -663,14 +663,14 @@ code = '''
|
||||
|
||||
uint32_t prng = 42;
|
||||
|
||||
// write to our mdir until >gc_compactmeta_thresh full
|
||||
// write to our mdir until >gc_compact_thresh full
|
||||
lfs3_file_t file;
|
||||
lfs3_file_open(&lfs3, &file, "jellyfish",
|
||||
LFS3_O_RDWR | LFS3_O_CREAT | LFS3_O_EXCL) => 0;
|
||||
|
||||
// hack, don't use the internals like this
|
||||
uint8_t wbuf[SIZE];
|
||||
while ((file.b.h.mdir.r.eoff & 0x7fffffff) <= GC_COMPACTMETA_THRESH) {
|
||||
while ((file.b.h.mdir.r.eoff & 0x7fffffff) <= GC_COMPACT_THRESH) {
|
||||
lfs3_file_rewind(&lfs3, &file) => 0;
|
||||
for (lfs3_size_t j = 0; j < SIZE; j++) {
|
||||
wbuf[j] = 'a' + (TEST_PRNG(&prng) % 26);
|
||||
@@ -682,7 +682,7 @@ code = '''
|
||||
// expect dirty initial state or else our test doesn't work
|
||||
struct lfs3_fsinfo fsinfo;
|
||||
lfs3_fs_stat(&lfs3, &fsinfo) => 0;
|
||||
assert(fsinfo.flags & LFS3_I_COMPACTMETA);
|
||||
assert(fsinfo.flags & LFS3_I_COMPACT);
|
||||
assert(lfs3.handles != &lfs3.gc.t.h);
|
||||
|
||||
// run GC one traversal + one step
|
||||
@@ -705,14 +705,14 @@ code = '''
|
||||
lfs3_file_write(&lfs3, &file, wbuf, SIZE) => SIZE;
|
||||
lfs3_file_sync(&lfs3, &file) => 0;
|
||||
|
||||
// run GC until our traversal is done (twice for compactmeta)
|
||||
// run GC until our traversal is done (twice for compact)
|
||||
while (lfs3.handles == &lfs3.gc.t.h) {
|
||||
lfs3_fs_gc(&lfs3) => 0;
|
||||
}
|
||||
|
||||
// we should _not_ make progress
|
||||
lfs3_fs_stat(&lfs3, &fsinfo) => 0;
|
||||
assert(fsinfo.flags & LFS3_I_COMPACTMETA);
|
||||
assert(fsinfo.flags & LFS3_I_COMPACT);
|
||||
|
||||
// check we can still read the file
|
||||
for (int remount = 0; remount < 2; remount++) {
|
||||
@@ -738,13 +738,13 @@ code = '''
|
||||
# test that mkconsistent can make progress in isolation
|
||||
[cases.test_gc_mkconsistent_progress]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
LFS3_GC_MKCONSISTENT
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
@@ -956,13 +956,13 @@ code = '''
|
||||
# test that mkconsistent dirtying still works with the GC API
|
||||
[cases.test_gc_mkconsistent_mutation]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
LFS3_GC_MKCONSISTENT
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
@@ -1822,13 +1822,13 @@ done:;
|
||||
defines.AFTER = [0, 1, 2, 3]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
@@ -1887,7 +1887,7 @@ code = '''
|
||||
| ((!GBMAP || (fsinfo.flags & LFS3_I_LOOKAHEAD))
|
||||
? LFS3_I_LOOKAHEAD
|
||||
: 0)
|
||||
| LFS3_I_COMPACTMETA
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| ((GBMAP) ? LFS3_IFDEF_GBMAP(LFS3_I_GBMAP, -1) : 0)));
|
||||
@@ -1908,7 +1908,7 @@ code = '''
|
||||
if (!(fsinfo.flags & (
|
||||
((MKCONSISTENT) ? LFS3_I_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_I_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_I_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_I_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_I_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_I_CKDATA : 0)))) {
|
||||
break;
|
||||
@@ -1937,7 +1937,7 @@ code = '''
|
||||
if (!(fsinfo.flags & (
|
||||
((MKCONSISTENT) ? LFS3_I_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_I_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_I_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_I_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_I_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_I_CKDATA : 0)))) {
|
||||
break;
|
||||
@@ -1963,11 +1963,11 @@ code = '''
|
||||
lfs3_trv_close(&lfs3, &trv) => 0;
|
||||
}
|
||||
|
||||
if (COMPACTMETA && (fsinfo.flags & LFS3_I_COMPACTMETA)) {
|
||||
if (COMPACT && (fsinfo.flags & LFS3_I_COMPACT)) {
|
||||
// we need an explicit traversal for this
|
||||
lfs3_trv_t trv;
|
||||
lfs3_trv_open(&lfs3, &trv,
|
||||
LFS3_T_RDWR | LFS3_T_COMPACTMETA) => 0;
|
||||
LFS3_T_RDWR | LFS3_T_COMPACT) => 0;
|
||||
while (true) {
|
||||
struct lfs3_tinfo tinfo;
|
||||
int err = lfs3_trv_read(&lfs3, &trv, &tinfo);
|
||||
@@ -2007,7 +2007,7 @@ code = '''
|
||||
&& (!GBMAP || (fsinfo.flags & LFS3_I_LOOKAHEAD)))
|
||||
? LFS3_I_LOOKAHEAD
|
||||
: 0)
|
||||
| ((!COMPACTMETA) ? LFS3_I_COMPACTMETA : 0)
|
||||
| ((!COMPACT) ? LFS3_I_COMPACT : 0)
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
@@ -2025,13 +2025,13 @@ code = '''
|
||||
defines.AFTER = [0, 1, 2, 3]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
@@ -2090,7 +2090,7 @@ code = '''
|
||||
| ((!GBMAP || (fsinfo.flags & LFS3_I_LOOKAHEAD))
|
||||
? LFS3_I_LOOKAHEAD
|
||||
: 0)
|
||||
| LFS3_I_COMPACTMETA
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA
|
||||
| ((GBMAP) ? LFS3_IFDEF_GBMAP(LFS3_I_GBMAP, -1) : 0)));
|
||||
@@ -2111,7 +2111,7 @@ code = '''
|
||||
if (!(fsinfo.flags & (
|
||||
((MKCONSISTENT) ? LFS3_I_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_I_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_I_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_I_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_I_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_I_CKDATA : 0)))) {
|
||||
break;
|
||||
@@ -2140,7 +2140,7 @@ code = '''
|
||||
if (!(fsinfo.flags & (
|
||||
((MKCONSISTENT) ? LFS3_I_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_I_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_I_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_I_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_I_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_I_CKDATA : 0)))) {
|
||||
break;
|
||||
@@ -2166,11 +2166,11 @@ code = '''
|
||||
lfs3_trv_close(&lfs3, &trv) => 0;
|
||||
}
|
||||
|
||||
if (COMPACTMETA && (fsinfo.flags & LFS3_I_COMPACTMETA)) {
|
||||
if (COMPACT && (fsinfo.flags & LFS3_I_COMPACT)) {
|
||||
// we need an explicit traversal for this
|
||||
lfs3_trv_t trv;
|
||||
lfs3_trv_open(&lfs3, &trv,
|
||||
LFS3_T_RDWR | LFS3_T_COMPACTMETA) => 0;
|
||||
LFS3_T_RDWR | LFS3_T_COMPACT) => 0;
|
||||
while (true) {
|
||||
struct lfs3_tinfo tinfo;
|
||||
int err = lfs3_trv_read(&lfs3, &trv, &tinfo);
|
||||
@@ -2210,7 +2210,7 @@ code = '''
|
||||
&& (!GBMAP || (fsinfo.flags & LFS3_I_LOOKAHEAD)))
|
||||
? LFS3_I_LOOKAHEAD
|
||||
: 0)
|
||||
| ((!COMPACTMETA) ? LFS3_I_COMPACTMETA : 0)
|
||||
| ((!COMPACT) ? LFS3_I_COMPACT : 0)
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
@@ -2228,7 +2228,7 @@ code = '''
|
||||
| ((!GBMAP || (fsinfo.flags & LFS3_I_LOOKAHEAD))
|
||||
? LFS3_I_LOOKAHEAD
|
||||
: 0)
|
||||
| LFS3_I_COMPACTMETA
|
||||
| LFS3_I_COMPACT
|
||||
// note ckdata implies ckmeta, but uncking ckdata does
|
||||
// _not_ imply uncking ckmeta
|
||||
| ((!(CKDATA && !CKMETA)) ? LFS3_I_CKMETA : 0)
|
||||
@@ -2251,7 +2251,7 @@ code = '''
|
||||
if (!(fsinfo.flags & (
|
||||
((MKCONSISTENT) ? LFS3_I_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_I_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_I_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_I_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_I_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_I_CKDATA : 0)))) {
|
||||
break;
|
||||
@@ -2280,7 +2280,7 @@ code = '''
|
||||
if (!(fsinfo.flags & (
|
||||
((MKCONSISTENT) ? LFS3_I_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_I_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_I_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_I_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_I_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_I_CKDATA : 0)))) {
|
||||
break;
|
||||
@@ -2306,11 +2306,11 @@ code = '''
|
||||
lfs3_trv_close(&lfs3, &trv) => 0;
|
||||
}
|
||||
|
||||
if (COMPACTMETA && (fsinfo.flags & LFS3_I_COMPACTMETA)) {
|
||||
if (COMPACT && (fsinfo.flags & LFS3_I_COMPACT)) {
|
||||
// we need an explicit traversal for this
|
||||
lfs3_trv_t trv;
|
||||
lfs3_trv_open(&lfs3, &trv,
|
||||
LFS3_T_RDWR | LFS3_T_COMPACTMETA) => 0;
|
||||
LFS3_T_RDWR | LFS3_T_COMPACT) => 0;
|
||||
while (true) {
|
||||
struct lfs3_tinfo tinfo;
|
||||
int err = lfs3_trv_read(&lfs3, &trv, &tinfo);
|
||||
@@ -2350,7 +2350,7 @@ code = '''
|
||||
&& (!GBMAP || (fsinfo.flags & LFS3_I_LOOKAHEAD)))
|
||||
? LFS3_I_LOOKAHEAD
|
||||
: 0)
|
||||
| ((!COMPACTMETA) ? LFS3_I_COMPACTMETA : 0)
|
||||
| ((!COMPACT) ? LFS3_I_COMPACT : 0)
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
@@ -2365,19 +2365,19 @@ code = '''
|
||||
defines.N = 100
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
defines.SIZE = [
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
@@ -2437,19 +2437,19 @@ code = '''
|
||||
defines.N = 100
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
defines.SIZE = [
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
@@ -2512,20 +2512,20 @@ code = '''
|
||||
[cases.test_gc_nospc]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
# DON'T test with GC_STEPS=-1, it may never terminate!
|
||||
defines.GC_STEPS = [1, 2, 10, 100, 1000]
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
defines.SIZE = 'BLOCK_SIZE'
|
||||
ifdef = 'LFS3_GC'
|
||||
code = '''
|
||||
@@ -2617,20 +2617,20 @@ code = '''
|
||||
[cases.test_gc_spam_dir_many]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.UNCK = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
|
||||
ifdef = 'LFS3_GC'
|
||||
code = '''
|
||||
@@ -2724,20 +2724,20 @@ code = '''
|
||||
[cases.test_gc_spam_dir_fuzz]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.UNCK = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64, 128, 256]
|
||||
defines.OPS = '2*N'
|
||||
defines.SEED = 42
|
||||
@@ -2902,20 +2902,20 @@ code = '''
|
||||
[cases.test_gc_spam_file_many]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.UNCK = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
@@ -3003,20 +3003,20 @@ code = '''
|
||||
[cases.test_gc_spam_file_fuzz]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.UNCK = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.OPS = '2*N'
|
||||
defines.SIZE = [
|
||||
@@ -3243,20 +3243,20 @@ code = '''
|
||||
[cases.test_gc_spam_fwrite_fuzz]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.UNCK = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
defines.OPS = 20
|
||||
defines.SIZE = [
|
||||
'FCACHE_SIZE/2',
|
||||
@@ -3403,20 +3403,20 @@ code = '''
|
||||
[cases.test_gc_spam_uz_fuzz]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.UNCK = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
# you probably need to flush if you expect errors
|
||||
defines.FLUSH = false
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
@@ -3854,20 +3854,20 @@ code = '''
|
||||
[cases.test_gc_spam_uzd_fuzz]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
defines.LOOKAHEAD = [false, true]
|
||||
defines.COMPACTMETA = [false, true]
|
||||
defines.COMPACT = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.UNCK = [false, true]
|
||||
defines.GC_FLAGS = '''
|
||||
((MKCONSISTENT) ? LFS3_GC_MKCONSISTENT : 0)
|
||||
| ((LOOKAHEAD) ? LFS3_GC_LOOKAHEAD : 0)
|
||||
| ((COMPACTMETA) ? LFS3_GC_COMPACTMETA : 0)
|
||||
| ((COMPACT) ? LFS3_GC_COMPACT : 0)
|
||||
| ((CKMETA) ? LFS3_GC_CKMETA : 0)
|
||||
| ((CKDATA) ? LFS3_GC_CKDATA : 0)
|
||||
'''
|
||||
defines.GC_STEPS = [-1, 1, 2, 10, 100, 1000]
|
||||
# set compactmeta thresh to minimum
|
||||
defines.GC_COMPACTMETA_THRESH = 'BLOCK_SIZE/2'
|
||||
# set compact thresh to minimum
|
||||
defines.GC_COMPACT_THRESH = 'BLOCK_SIZE/2'
|
||||
# you probably need to flush if you expect errors
|
||||
defines.FLUSH = false
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
|
||||
Reference in New Issue
Block a user