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:
+56
-56
@@ -19,8 +19,8 @@ defines.PROG_SIZE = [1, 16]
|
||||
[cases.test_fwrite_simple]
|
||||
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',
|
||||
@@ -400,8 +400,8 @@ code = '''
|
||||
[cases.test_fwrite_incr]
|
||||
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',
|
||||
@@ -826,8 +826,8 @@ code = '''
|
||||
# write strategies
|
||||
[cases.test_fwrite_overwrite]
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1008,8 +1008,8 @@ code = '''
|
||||
# similar to overwrite files, but without underlying data
|
||||
[cases.test_fwrite_holes]
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1194,8 +1194,8 @@ code = '''
|
||||
[cases.test_fwrite_truncate]
|
||||
defines.FROM = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1203,8 +1203,8 @@ defines.FROM = [
|
||||
]
|
||||
defines.TO = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1309,8 +1309,8 @@ code = '''
|
||||
[cases.test_fwrite_truncate_truncate]
|
||||
defines.FROM = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1318,8 +1318,8 @@ defines.FROM = [
|
||||
]
|
||||
defines.AND = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1327,8 +1327,8 @@ defines.AND = [
|
||||
]
|
||||
defines.TO = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1452,8 +1452,8 @@ code = '''
|
||||
[cases.test_fwrite_fruncate]
|
||||
defines.FROM = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1461,8 +1461,8 @@ defines.FROM = [
|
||||
]
|
||||
defines.TO = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1571,8 +1571,8 @@ code = '''
|
||||
[cases.test_fwrite_fruncate_fruncate]
|
||||
defines.FROM = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1580,8 +1580,8 @@ defines.FROM = [
|
||||
]
|
||||
defines.AND = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -1589,8 +1589,8 @@ defines.AND = [
|
||||
]
|
||||
defines.TO = [
|
||||
'0',
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2299,8 +2299,8 @@ code = '''
|
||||
# writing any data structure backwards always reveals issues
|
||||
[cases.test_fwrite_reversed]
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -2762,8 +2762,8 @@ code = '''
|
||||
# with lfs3_file_fruncate, we can write to a file in true reversed order
|
||||
[cases.test_fwrite_freversed]
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -3223,8 +3223,8 @@ code = '''
|
||||
# trigger compaction
|
||||
[cases.test_fwrite_overwrite_compaction]
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -3414,8 +3414,8 @@ code = '''
|
||||
|
||||
[cases.test_fwrite_hole_compaction]
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -3610,8 +3610,8 @@ code = '''
|
||||
[cases.test_fwrite_fuzz_aligned]
|
||||
defines.N = 20
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -3753,8 +3753,8 @@ code = '''
|
||||
[cases.test_fwrite_fuzz_unaligned]
|
||||
defines.N = 20
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -3903,8 +3903,8 @@ code = '''
|
||||
defines.N = 20
|
||||
defines.WHENCE = ['LFS3_SEEK_SET', 'LFS3_SEEK_CUR', 'LFS3_SEEK_END']
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -3982,8 +3982,8 @@ code = '''
|
||||
defines.N = 10
|
||||
defines.WHENCE = ['LFS3_SEEK_SET', 'LFS3_SEEK_CUR', 'LFS3_SEEK_END']
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -4129,8 +4129,8 @@ code = '''
|
||||
defines.N = 10
|
||||
defines.WHENCE = ['LFS3_SEEK_SET', 'LFS3_SEEK_CUR', 'LFS3_SEEK_END']
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -4301,8 +4301,8 @@ code = '''
|
||||
[cases.test_fwrite_seek_negative]
|
||||
defines.WHENCE = ['LFS3_SEEK_SET', 'LFS3_SEEK_CUR', 'LFS3_SEEK_END']
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -4409,8 +4409,8 @@ code = '''
|
||||
# test that write overflow errors
|
||||
[cases.test_fwrite_fbig]
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -4517,8 +4517,8 @@ code = '''
|
||||
# test that truncate overflow errors
|
||||
[cases.test_fwrite_truncate_fbig]
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -4618,8 +4618,8 @@ code = '''
|
||||
# test that fruncate overflow errors
|
||||
[cases.test_fwrite_fruncate_fbig]
|
||||
defines.SIZE = [
|
||||
'FILE_CACHE_SIZE/2',
|
||||
'2*FILE_CACHE_SIZE',
|
||||
'FCACHE_SIZE/2',
|
||||
'2*FCACHE_SIZE',
|
||||
'BLOCK_SIZE/2',
|
||||
'BLOCK_SIZE',
|
||||
'2*BLOCK_SIZE',
|
||||
@@ -4721,8 +4721,8 @@ code = '''
|
||||
[cases.test_fwrite_rwtf_fuzz]
|
||||
defines.N = 20
|
||||
defines.SIZE = [
|
||||
'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