Renamed file_cache -> fcache and gbmap_re -> regbmap
This walks back some of the attempt at strict object namespacing in struct lfs3_cfg: - cfg.file_cache_size -> cfg.fcache_size - filecfg.cache_size -> filecfg.fcache_size - filecfg.cache_buffer -> filecfg.fcache_buffer - cfg.gbmap_re_thresh -> cfg.regbmap_thresh Motivation: - cfg.regbmap_thresh now matches cfg.gc_regbmap_thresh, instead of using awkwardly different namespacing patterns. - Giving fcache a more unique name is useful for discussion. Having pcache, rcache, and then file_cache was a bit awkward. Hopefully it's also more clear that cfg.fcache_size and filecfg.fcache_size are related. - Config in struct lfs3_cfg is named a bit more consistently, well, if you ignore gc_*_* options. - Less typing. Though this gets into pretty subjective naming territory. May revert this if the new terms are uncomfortable after use.
This commit is contained in:
+48
-48
@@ -655,21 +655,21 @@ code = '''
|
||||
# try writing larger files
|
||||
#
|
||||
# note:
|
||||
# - at 2*FILE_CACHE_SIZE we need a shrub
|
||||
# - at 2*FCACHE_SIZE we need a shrub
|
||||
# - at BLOCK_SIZE/2 we need a block pointer
|
||||
# - at 2*BLOCK_SIZE we need a btree
|
||||
#
|
||||
[cases.test_files_more]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.FILE_CACHE_SIZE = 64
|
||||
defines.FCACHE_SIZE = 64
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -738,8 +738,8 @@ code = '''
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -831,8 +831,8 @@ defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.OPS = '2*N'
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1345,15 +1345,15 @@ code = '''
|
||||
[cases.test_files_rm]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.FILE_CACHE_SIZE = 64
|
||||
defines.FCACHE_SIZE = 64
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -1414,8 +1414,8 @@ defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.REMAINING = [4, 1, 0]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1570,8 +1570,8 @@ defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.OPS = '2*N'
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1726,8 +1726,8 @@ code = '''
|
||||
[cases.test_files_mv]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1735,7 +1735,7 @@ defines.SIZE = [
|
||||
]
|
||||
defines.N = [0, 128]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.FILE_CACHE_SIZE = 64
|
||||
defines.FCACHE_SIZE = 64
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -1827,8 +1827,8 @@ code = '''
|
||||
[cases.test_files_mv_replace]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1836,7 +1836,7 @@ defines.SIZE = [
|
||||
]
|
||||
defines.N = [0, 128]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.FILE_CACHE_SIZE = 64
|
||||
defines.FCACHE_SIZE = 64
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -1938,15 +1938,15 @@ code = '''
|
||||
[cases.test_files_mv_noop]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.FILE_CACHE_SIZE = 64
|
||||
defines.FCACHE_SIZE = 64
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -2023,15 +2023,15 @@ code = '''
|
||||
[cases.test_files_mv_not_file]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.FILE_CACHE_SIZE = 64
|
||||
defines.FCACHE_SIZE = 64
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -2119,15 +2119,15 @@ code = '''
|
||||
[cases.test_files_mv_not_dir]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.FILE_CACHE_SIZE = 64
|
||||
defines.FCACHE_SIZE = 64
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -2215,15 +2215,15 @@ code = '''
|
||||
[cases.test_files_mv_not_root]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.FILE_CACHE_SIZE = 64
|
||||
defines.FCACHE_SIZE = 64
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -2300,15 +2300,15 @@ code = '''
|
||||
[cases.test_files_mv_not_noent]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
'4*BLOCK_SIZE',
|
||||
]
|
||||
defines.REMOUNT = [false, true]
|
||||
defines.FILE_CACHE_SIZE = 64
|
||||
defines.FCACHE_SIZE = 64
|
||||
code = '''
|
||||
lfs3_t lfs3;
|
||||
lfs3_format(&lfs3, LFS3_F_RDWR, CFG) => 0;
|
||||
@@ -2386,8 +2386,8 @@ code = '''
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2533,8 +2533,8 @@ code = '''
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2608,8 +2608,8 @@ code = '''
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2687,8 +2687,8 @@ defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.OPS = '2*N'
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2884,8 +2884,8 @@ defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.OPS = '2*N'
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -3105,8 +3105,8 @@ defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.OPS = '2*N'
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
|
||||
Reference in New Issue
Block a user