Renamed lfs->cfg->shrub_size -> lfs->cfg->inline_size
While I think shrub_size is probably the more correct name at a technical level, inline_size is probably more what users expect and doesn't require a deeper understanding of filesystem details. The only risk is that users may think inline_size has no effect on large files, when in fact it still controls how much of the btree root can be inlined. There's also the point that sticking with inline_size maintains compatibility with both the upstream version and any future version that has other file representations. May revisit this, but renaming to lfs->cfg->inline_size for now.
This commit is contained in:
+3
-3
@@ -1657,7 +1657,7 @@ code = '''
|
||||
defines.BADBIT = -1
|
||||
defines.BADBLOCK_BEHAVIOR = 'LFS_EMUBD_BADBLOCK_PROGFLIP'
|
||||
# force the file to create a btree
|
||||
defines.SHRUB_SIZE = 0
|
||||
defines.INLINE_SIZE = 0
|
||||
defines.CRYSTAL_THRESH = -1
|
||||
defines.FRAGMENT_SIZE = 'BLOCK_SIZE/8'
|
||||
defines.SIZE = '2*FRAGMENT_SIZE'
|
||||
@@ -1956,7 +1956,7 @@ code = '''
|
||||
[cases.test_ck_ckfetches_btree]
|
||||
defines.BADBIT = -1
|
||||
# force the file to create a btree
|
||||
defines.SHRUB_SIZE = 0
|
||||
defines.INLINE_SIZE = 0
|
||||
defines.CRYSTAL_THRESH = -1
|
||||
defines.FRAGMENT_SIZE = 'BLOCK_SIZE/8'
|
||||
defines.SIZE = '2*FRAGMENT_SIZE'
|
||||
@@ -2213,7 +2213,7 @@ defines.BADBLOCK_BEHAVIOR = [
|
||||
'LFS_EMUBD_BADBLOCK_READFLIP',
|
||||
]
|
||||
# force the file to create a btree
|
||||
defines.SHRUB_SIZE = 0
|
||||
defines.INLINE_SIZE = 0
|
||||
defines.CRYSTAL_THRESH = -1
|
||||
defines.FRAGMENT_SIZE = 'BLOCK_SIZE/8'
|
||||
defines.SIZE = '2*FRAGMENT_SIZE'
|
||||
|
||||
@@ -103,7 +103,7 @@ code = '''
|
||||
defines.N = [0, 1, 2, 3, 4]
|
||||
defines.SIZE = 'N*FRAGMENT_SIZE'
|
||||
# force a btree node
|
||||
defines.SHRUB_SIZE = 0
|
||||
defines.INLINE_SIZE = 0
|
||||
defines.CRYSTAL_THRESH = -1
|
||||
defines.SYNC = [false, true]
|
||||
in = 'lfs.c'
|
||||
@@ -487,7 +487,7 @@ defines.N = [0, 1, 2, 3, 4]
|
||||
defines.SIZE = 'N*FRAGMENT_SIZE'
|
||||
defines.CHUNK = [32, 8, 1]
|
||||
# force a btree node
|
||||
defines.SHRUB_SIZE = 0
|
||||
defines.INLINE_SIZE = 0
|
||||
defines.CRYSTAL_THRESH = -1
|
||||
defines.SYNC = [false, true]
|
||||
defines.REMOUNT = [false, true]
|
||||
|
||||
@@ -128,7 +128,7 @@ defines.POWERLOSS_BEHAVIOR = [
|
||||
]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
# inlining has a tendency to hide sync issues, so try without
|
||||
defines.SHRUB_SIZE = ['BLOCK_SIZE/4', '0']
|
||||
defines.INLINE_SIZE = ['BLOCK_SIZE/4', '0']
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.SIZE = [
|
||||
'0',
|
||||
@@ -228,7 +228,7 @@ defines.POWERLOSS_BEHAVIOR = [
|
||||
]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
# inlining has a tendency to hide sync issues, so try without
|
||||
defines.SHRUB_SIZE = ['BLOCK_SIZE/4', '0']
|
||||
defines.INLINE_SIZE = ['BLOCK_SIZE/4', '0']
|
||||
defines.N = [1, 2, 4, 8, 16, 32, 64]
|
||||
defines.OPS = 256
|
||||
defines.SIZE = [
|
||||
@@ -458,7 +458,7 @@ defines.POWERLOSS_BEHAVIOR = [
|
||||
]
|
||||
defines.MKCONSISTENT = [false, true]
|
||||
# inlining has a tendency to hide sync issues, so try without
|
||||
defines.SHRUB_SIZE = ['BLOCK_SIZE/4', '0']
|
||||
defines.INLINE_SIZE = ['BLOCK_SIZE/4', '0']
|
||||
# note dirs x files grows O(n^2)
|
||||
defines.N = [1, 2, 4, 8]
|
||||
defines.M = 'N'
|
||||
|
||||
@@ -2286,7 +2286,7 @@ defines.LOOKAHEAD = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.SIZE = '2*BLOCK_SIZE'
|
||||
defines.SHRUB_SIZE = 0
|
||||
defines.INLINE_SIZE = 0
|
||||
defines.TRUNC = [false, true]
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
@@ -2569,7 +2569,7 @@ defines.LOOKAHEAD = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.SIZE = '2*BLOCK_SIZE'
|
||||
defines.SHRUB_SIZE = 0
|
||||
defines.INLINE_SIZE = 0
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
lfsr_format(&lfs, LFS_F_RDWR, CFG) => 0;
|
||||
@@ -2858,7 +2858,7 @@ defines.LOOKAHEAD = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
defines.SIZE = '2*BLOCK_SIZE'
|
||||
defines.SHRUB_SIZE = 0
|
||||
defines.INLINE_SIZE = 0
|
||||
defines.DESYNC = [false, true]
|
||||
code = '''
|
||||
lfs_t lfs;
|
||||
@@ -6652,7 +6652,7 @@ defines.LOOKAHEAD = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
# limit files to very simple btrees
|
||||
defines.SHRUB_SIZE = 0
|
||||
defines.INLINE_SIZE = 0
|
||||
defines.CRYSTAL_THRESH = -1
|
||||
defines.FRAGMENT_SIZE = 'BLOCK_SIZE/8'
|
||||
defines.SIZE = '2*FRAGMENT_SIZE'
|
||||
@@ -6812,7 +6812,7 @@ defines.LOOKAHEAD = [false, true]
|
||||
defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
# limit files to very simple btrees
|
||||
defines.SHRUB_SIZE = 0
|
||||
defines.INLINE_SIZE = 0
|
||||
defines.CRYSTAL_THRESH = -1
|
||||
defines.FRAGMENT_SIZE = 'BLOCK_SIZE/8'
|
||||
defines.SIZE = '2*FRAGMENT_SIZE'
|
||||
@@ -6971,7 +6971,7 @@ defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
# this configuration should create a 2-layer bshrub, which may be
|
||||
# a bit delicate
|
||||
defines.SHRUB_SIZE = 'BLOCK_SIZE/4'
|
||||
defines.INLINE_SIZE = 'BLOCK_SIZE/4'
|
||||
defines.CRYSTAL_THRESH = -1
|
||||
defines.FRAGMENT_SIZE = 'BLOCK_SIZE/8'
|
||||
defines.SIZE = 'BLOCK_SIZE'
|
||||
@@ -7140,7 +7140,7 @@ defines.CKMETA = [false, true]
|
||||
defines.CKDATA = [false, true]
|
||||
# this configuration should create a 2-layer bshrub, which may be
|
||||
# a bit delicate
|
||||
defines.SHRUB_SIZE = 'BLOCK_SIZE/4'
|
||||
defines.INLINE_SIZE = 'BLOCK_SIZE/4'
|
||||
defines.CRYSTAL_THRESH = -1
|
||||
defines.FRAGMENT_SIZE = 'BLOCK_SIZE/8'
|
||||
defines.SIZE = 'BLOCK_SIZE'
|
||||
|
||||
Reference in New Issue
Block a user