Relaxed fragment_size limit from block_size/8 -> block_size/4
The concern with block_size/4 is that it limits fragments to a single fragment per-block. But while this may be inefficient, it's technically not wrong, and may still work with other metadata (bptrs, file names, uattrs, etc) taking up the remaining space. This deserves benchmarking, but even if this ends up being a terrible configuration, we should just discourage this via good defaults and documentation.
This commit is contained in:
@@ -15231,8 +15231,8 @@ static int lfs_init(lfs_t *lfs, const struct lfs_config *cfg) {
|
||||
LFS_ASSERT(lfs->cfg->inline_size <= lfs->cfg->block_size/4);
|
||||
// shrub_size must be <= block_size/4
|
||||
LFS_ASSERT(lfs->cfg->shrub_size <= lfs->cfg->block_size/4);
|
||||
// fragment_size must be <= block_size/8
|
||||
LFS_ASSERT(lfs->cfg->fragment_size <= lfs->cfg->block_size/8);
|
||||
// fragment_size must be <= block_size/4
|
||||
LFS_ASSERT(lfs->cfg->fragment_size <= lfs->cfg->block_size/4);
|
||||
|
||||
// setup read cache
|
||||
lfs->rcache.block = 0;
|
||||
|
||||
Reference in New Issue
Block a user