Renamed/reverted file->buffer -> file->cache
And the related config options: - cfg->file_buffer_size -> cfg->file_cache_size - file->cfg->buffer_size -> file->cfg->cache_size - file->cfg->buffer -> file->cfg->cache_buffer The original motivation to rename this to file->buffer was to better align with what other filesystems call this, but I think this is a case where internal consistency is more important than external consistency. file->cache better matches lfs->pcache and lfs->rcache, and makes it easier to read code involving both file->cache and other user-provided buffers. Keeping the upstream name also helps with continuity.
This commit is contained in:
@@ -112,7 +112,7 @@ void bench_permutation(size_t i, uint32_t *buffer, size_t size);
|
||||
BENCH_DEFINE(BLOCK_RECYCLES, -1 ) \
|
||||
BENCH_DEFINE(RCACHE_SIZE, LFS_MAX(16, READ_SIZE) ) \
|
||||
BENCH_DEFINE(PCACHE_SIZE, LFS_MAX(16, PROG_SIZE) ) \
|
||||
BENCH_DEFINE(FILE_BUFFER_SIZE, 16 ) \
|
||||
BENCH_DEFINE(FILE_CACHE_SIZE, 16 ) \
|
||||
BENCH_DEFINE(LOOKAHEAD_SIZE, 16 ) \
|
||||
BENCH_DEFINE(GC_FLAGS, 0 ) \
|
||||
BENCH_DEFINE(GC_STEPS, 0 ) \
|
||||
@@ -142,7 +142,7 @@ void bench_permutation(size_t i, uint32_t *buffer, size_t size);
|
||||
.block_recycles = BLOCK_RECYCLES, \
|
||||
.rcache_size = RCACHE_SIZE, \
|
||||
.pcache_size = PCACHE_SIZE, \
|
||||
.file_buffer_size = FILE_BUFFER_SIZE, \
|
||||
.file_cache_size = FILE_CACHE_SIZE, \
|
||||
.lookahead_size = LOOKAHEAD_SIZE, \
|
||||
BENCH_GC_CFG \
|
||||
.gc_compact_thresh = GC_COMPACT_THRESH, \
|
||||
|
||||
Reference in New Issue
Block a user