bmap: Fixed up low-hanging fruit, tests and things
- Consistent grm_op -> alloc_ckpoint -> mdir_commit order
- Drop some low priority TODOs
- Got test_alloc at least passing existing tests
- Got test_gc passing
- Got test_mount passing
- test_relocations was already passing, lol
No code changes:
code stack ctx
before: 36912 2368 684
after: 36912 (+0.0%) 2368 (+0.0%) 684 (+0.0%)
code stack ctx
bmap before: 38456 2400 812
bmap after: 38456 (+0.0%) 2400 (+0.0%) 812 (+0.0%)
This commit is contained in:
+14
-10
@@ -1,9 +1,6 @@
|
||||
# Advanced mount tests
|
||||
after = ['test_mtree', 'test_trvs']
|
||||
|
||||
# TODO bmap workaround?
|
||||
ifndef = 'LFS3_BMAP'
|
||||
|
||||
|
||||
# test we can mount
|
||||
[cases.test_mount_simple]
|
||||
@@ -89,7 +86,8 @@ code = '''
|
||||
| ((!COMPACT) ? LFS3_I_COMPACT : 0)
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)));
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
@@ -156,7 +154,8 @@ code = '''
|
||||
| LFS3_I_LOOKAHEAD
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA));
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
// with LFS3_M_LOOKAHEAD, mount performs a lookahead scan
|
||||
@@ -172,7 +171,8 @@ code = '''
|
||||
| LFS3_I_COMPACT
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)));
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
'''
|
||||
|
||||
@@ -227,7 +227,8 @@ code = '''
|
||||
| LFS3_I_LOOKAHEAD
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA));
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
// with LFS3_M_COMPACT, mount compact any uncompacted blocks
|
||||
@@ -244,7 +245,8 @@ code = '''
|
||||
| ((!LOOKAHEAD) ? LFS3_I_LOOKAHEAD : 0)
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)));
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
|
||||
// mdir should have been compacted
|
||||
lfs3_file_open(&lfs3, &file, "jellyfish", LFS3_O_RDONLY) => 0;
|
||||
@@ -329,7 +331,8 @@ code = '''
|
||||
| LFS3_I_LOOKAHEAD
|
||||
| LFS3_I_COMPACT
|
||||
| LFS3_I_CKMETA
|
||||
| LFS3_I_CKDATA));
|
||||
| LFS3_I_CKDATA
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
lfs3_unmount(&lfs3) => 0;
|
||||
|
||||
// with LFS3_M_MKCONSISTENT, mount cleans up orphans eagerly
|
||||
@@ -347,7 +350,8 @@ code = '''
|
||||
| ((!COMPACT) ? LFS3_I_COMPACT : 0)
|
||||
// note ckdata implies ckmeta
|
||||
| ((!CKMETA && !CKDATA) ? LFS3_I_CKMETA : 0)
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)));
|
||||
| ((!CKDATA) ? LFS3_I_CKDATA : 0)
|
||||
| LFS3_IFDEF_BMAP(LFS3_I_BMAPCACHE, 0)));
|
||||
|
||||
// check we can still read the files
|
||||
lfs3_file_open(&lfs3, &file, "cuttlefish", LFS3_O_RDONLY) => 0;
|
||||
|
||||
Reference in New Issue
Block a user