v2.11
A small minor release, driven by features proposed by @sosthene-nitrokey and @yamt, with bug fixes from @DvdGiessen, @selimkeles, and yours truly.
What's new?
-
Thanks to @sosthene-nitrokey,
lfs_fs_grownow supports a limited form of filesystem shrinking (#1094)If compiled with
LFS_SHRINKNONRELOCATING,lfs_fs_growcan be used to reduce theblock_count, as long is it does not require block relocation. This provides a useful path for migrating from old filesystem images created when littlefs ignored the on-diskblock_count.Note that this is unreliable for general use. littlefs allocates blocks pseudorandomly as a part of wear-leveling, so
LFS_SHRINKNONRELOCATINGis unlikely to succeed even with small filesystems. -
Thanks to @yamt,
make testshould now work on Mac out of the box. This required linker and Makefile changes due to littlefs's test-runner quirks (#1090, #1091)As a side-effect, littlefs's Makefile can now compile with Clang. The only limitation being that stack measurements are currently broken. If anyone knows a good Clang alternative to GCC's
-fcallgraph-info=su, feel free to create an issue (or PR if you're willing to write a bit of python).littlefs's Makefile can also compile with other non-Clang non-GCC compilers if you set the
NO_GCCenvironment variable. -
@DvdGiessen fixed several bugs related to LFS_CRC (1095)
- User provided LFS_CRCs no longer create multiple definitions if
lfs_util.his included in more than one file. - LFS_CRC no longer needs a trailing semicolon.
- User provided LFS_CRCs no longer create multiple definitions if
-
Thanks to @selimkeles,
lfs_fromle32/lfs_frombe32no longer risk overflow on 16-bit devices (#1100) -
Found by @Hugh-Baoa, fixed a double deorphan that can occur if an mdir relocates during a remove operation (#1099)
-
Thanks to @DvdGiessen,
changeprefix.pyno longer breaks if /tmp lives on a different filesystem (#1104)
Changes
| Code | Stack | Structs | Coverage | ||
|---|---|---|---|---|---|
| Default | 17104 B (-0.1%) | 1448 B (+0.0%) | 812 B (+0.0%) | Lines | 2434/2595 lines (+0.0%) |
| Readonly | 6230 B (+0.0%) | 448 B (+0.0%) | 812 B (+0.0%) | Branches | 1283/1616 branches (-0.0%) |
| Threadsafe | 17956 B (-0.1%) | 1448 B (+0.0%) | 820 B (+0.0%) | Benchmarks | |
| Multiversion | 17176 B (-0.1%) | 1448 B (+0.0%) | 816 B (+0.0%) | Readed | 29369693876 B (+0.0%) |
| Migrate | 18768 B (-0.1%) | 1752 B (+0.0%) | 816 B (+0.0%) | Proged | 1482874766 B (+0.0%) |
| Error-asserts | 17916 B (+0.1%) | 1440 B (+0.0%) | 812 B (+0.0%) | Erased | 1568888832 B (+0.0%) |
8434536 Bumped minor version to v2.11
ba250a3 use shutil.move instead of os.rename to move file
0115cf6 gha: Dropped explicit CFLAGS from clang testing in CI
bff4dfd Added NO_GCC to allow users to explicitly disable GCC-specific flags
edaaaf8 Apply review comments
7d79423 Rename SHRINKIFCHEAP to SHRINKNONRELOCATING
7782d3d Mention that shrinking is unlikely to work
f4a1bb3 fix: added uint32_t cast to the bitshift places In 16 bit and 8 bit architectures, overflow and underflow issues were occuring while using functions lfs_frombe32 and lfs_fromle32
9b8f802 fixup! Add support for shrinking a filesystem
a3d6bec Fixed a double deorphan caused by relocation mid dir remove
0634d13 tests: Added non-reentrant variants of orphan/relocation tests
2105e50 Add support for shrinking a filesystem
b823728 lfs_crc should be static if LFS_CRC is defined
0d861b7 adapt the linker sections usage to mach-o
26bee8a drop a few unsupported CFLAGS for clang
Sponsors
A special thanks to littlefs's sponsors: @micropython, @fusedFET