v2.4
What's new?
-
Graceful LFS_ASSERT (#514)
Thanks to @mon, @davidefer, and everyone else who provided feedback, littlefs now supports overriding LFS_ASSERT with a macro that can return an error instead of halting.
This doesn't change the behavior LFS_ASSERT itself, but just means littlefs only uses LFS_ASSERT in functions that return a signed error code. This is an internal rule littlefs will follow, and thanks to @mon we now have a CI job to prevent breaking this behavior. Outside of littlefs, you're free to use LFS_ASSERT in non-erroring functions, you'll just lose the ability to override LFS_ASSERT in this way.
-
New
metadata_max
config (#502)A great idea from @mon,
metadata_max
provides a workaround for performance issues littlefs faces with large block sizes (#203).metadata_max
reduces the performance hit of metadata compaction by artificially limiting how much of a metadata block we use. This improves performance since we there is less metadata to compact, but does mean we waste whatever space in the block we don't use. It's interesting tradeoff since the devices where block sizes are large enough for this to be an issue (NAND) also have enough storage to throw at this problem. It's not the best solution, but may make it possible to get past some of these performance bottlenecks.@mon notes a 10x speedup in directory traversal/file deletion and a 2x-4x speed up in file reads on a 128KiB NAND block device (MT29F) with
metadata_max
set to 4KiB. -
Adopt GitHub Actions for CI, and a number of script/Makefile improvements (#516)
Since this is primarily for development and doesn't affect most users, I will just point to the PR notes in #516.
If everything works, you will probably already see the new code size/coverage measurements automatically appended to these release notes.
One of the more interesting things to note is the addition of a post-release process to automatically create PRs against dependent repos. This should help keep dependents such as littlefs-fuse no longer constantly-out-of-date. If you want to add a repo to receive automatic PRs feel free to create a PR against the littlefs.post-release repo.
-
Thanks to @embeddedt,
lfs_file_seek
has a new optimization to avoid flushing caches when seeking to the same position (#511) -
littlefs now performs a sanity check in lfs_format after compacting the superblock, instead of before (#508)
Changes
Code size | Code size (readonly) |
Code size (threadsafe) |
Code size (migrate) |
Code size (error-asserts) |
Coverage |
---|---|---|---|---|---|
14600 B | 5586 B | 15422 B | 16296 B | 15212 B | 94.7% of 1758 lines |
3d4e4f2
Bumped minor version to v2.4
c0cc0a4
Enabled overriding of LFS_ASSERT/TRACE/DEBUG/etc
c9eed1f
Add test to ensure asserts can return
e7e4b35
lfs_fs_preporphans ret int for graceful LFS_ASSERT
21488d9
Fixed incorrect documentation in test.py
10a0883
Moved lfs_mdir_isopen behind LFS_NO_ASSERT
47d6b2f
Removed unnecessary truncate condition thanks to new seek optimization
745d98c
Fixed lfs_file_truncate issue where internal state may not be flushed
3216b07
Use lfs_file_rawsize to calculate LFS_SEEK_END position
6592719
Removed .travis.yml
c911061
Added post-release script, cleaned up workflows
104d651
Reduced build sources to just the core littlefs
6d3e4ac
Brought over the release workflow
9d65460
Fixed a recompilation issue in CI, tweaked coverage.py a bit more
b84fb6b
Added BUILDDIR, a bit of script reworking
887f366
Switched to lcov for coverage collection, greatly simplified coverage.py
eeeceb9
Added coverage.py, and optional coverage info to test.py
b2235e9
Added GitHub workflows to run tests
6bb4043
Skip flushing file if lfs_file_rawseek() doesn't change position
2b80453
Moved sanity check in lfs_format after compaction
d804c2d
Added scripts/code_size.py, for more in-depth code-size reporting
37f4de2
Remove inline_files_max and lfs_t entry for metadata_max
6b16daf
Add metadata_max and inline_file_max to config