Generated v2 prefixes
This commit is contained in:
@@ -112,7 +112,7 @@ jobs:
|
|||||||
table[$i,$j]=$c_camel
|
table[$i,$j]=$c_camel
|
||||||
((j+=1))
|
((j+=1))
|
||||||
|
|
||||||
for s in code stack struct
|
for s in code stack structs
|
||||||
do
|
do
|
||||||
f=sizes/thumb${c:+-$c}.$s.csv
|
f=sizes/thumb${c:+-$c}.$s.csv
|
||||||
[ -e $f ] && table[$i,$j]=$( \
|
[ -e $f ] && table[$i,$j]=$( \
|
||||||
|
|||||||
@@ -59,7 +59,7 @@ This leaves us with three major requirements for an embedded filesystem.
|
|||||||
RAM to temporarily store filesystem metadata.
|
RAM to temporarily store filesystem metadata.
|
||||||
|
|
||||||
For ROM, this means we need to keep our design simple and reuse code paths
|
For ROM, this means we need to keep our design simple and reuse code paths
|
||||||
were possible. For RAM we have a stronger requirement, all RAM usage is
|
where possible. For RAM we have a stronger requirement, all RAM usage is
|
||||||
bounded. This means RAM usage does not grow as the filesystem changes in
|
bounded. This means RAM usage does not grow as the filesystem changes in
|
||||||
size or number of files. This creates a unique challenge as even presumably
|
size or number of files. This creates a unique challenge as even presumably
|
||||||
simple operations, such as traversing the filesystem, become surprisingly
|
simple operations, such as traversing the filesystem, become surprisingly
|
||||||
@@ -626,7 +626,7 @@ log₂_n_ pointers that skip to different preceding elements of the
|
|||||||
skip-list.
|
skip-list.
|
||||||
|
|
||||||
The name comes from heavy use of the [CTZ instruction][wikipedia-ctz], which
|
The name comes from heavy use of the [CTZ instruction][wikipedia-ctz], which
|
||||||
lets us calculate the power-of-two factors efficiently. For a give block _n_,
|
lets us calculate the power-of-two factors efficiently. For a given block _n_,
|
||||||
that block contains ctz(_n_)+1 pointers.
|
that block contains ctz(_n_)+1 pointers.
|
||||||
|
|
||||||
```
|
```
|
||||||
|
|||||||
@@ -2151,9 +2151,11 @@ static int lfs2_dir_splittingcompact(lfs2_t *lfs2, lfs2_mdir_t *dir,
|
|||||||
return size;
|
return size;
|
||||||
}
|
}
|
||||||
|
|
||||||
// do we have extra space? littlefs can't reclaim this space
|
// littlefs cannot reclaim expanded superblocks, so expand cautiously
|
||||||
// by itself, so expand cautiously
|
//
|
||||||
if ((lfs2_size_t)size < lfs2->block_count/2) {
|
// if our filesystem is more than ~88% full, don't expand, this is
|
||||||
|
// somewhat arbitrary
|
||||||
|
if (lfs2->block_count - size > lfs2->block_count/8) {
|
||||||
LFS2_DEBUG("Expanding superblock at rev %"PRIu32, dir->rev);
|
LFS2_DEBUG("Expanding superblock at rev %"PRIu32, dir->rev);
|
||||||
int err = lfs2_dir_split(lfs2, dir, attrs, attrcount,
|
int err = lfs2_dir_split(lfs2, dir, attrs, attrcount,
|
||||||
source, begin, end);
|
source, begin, end);
|
||||||
|
|||||||
Reference in New Issue
Block a user