Skip to content

Releases: littlefs-project/littlefs

v2.9.3

29 Apr 22:00
Compare
Choose a tag to compare
Code Stack Structs Coverage
Default 17064 B (+0.2%) 1440 B (+0.6%) 812 B (+0.0%) Lines 2394/2574 lines (+0.0%)
Readonly 6194 B (+0.1%) 448 B (+0.0%) 812 B (+0.0%) Branches 1245/1584 branches (+0.0%)
Threadsafe 17924 B (+0.2%) 1440 B (+0.6%) 820 B (+0.0%) Benchmarks
Multiversion 17124 B (+0.2%) 1440 B (+0.6%) 816 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18760 B (+0.2%) 1744 B (+0.5%) 816 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17748 B (+0.2%) 1432 B (+0.6%) 812 B (+0.0%) Erased 1568888832 B (+0.0%)

0bbb8bc Reorganized external project links a bit
7808233 Added a link to mklittlefs
8336ecd Added a link to pico-littlefs-usb (FAT12 emulation)
11b036c Prevented unnecessary superblock rewrites if old version in superblock chain
25ee90f Clarified what is accessible at specific superblock offsets in SPEC.md
a60a986 Duplicate the superblock entry during superblock expansion

v2.9.2

17 Apr 18:03
68d28b5
Compare
Choose a tag to compare
Code Stack Structs Coverage
Default 17032 B (+0.0%) 1432 B (+0.0%) 812 B (+0.0%) Lines 2391/2571 lines (+0.0%)
Readonly 6190 B (+0.0%) 448 B (+0.0%) 812 B (+0.0%) Branches 1243/1582 branches (+0.0%)
Threadsafe 17896 B (+0.0%) 1432 B (+0.0%) 820 B (+0.0%) Benchmarks
Multiversion 17096 B (+0.0%) 1432 B (+0.0%) 816 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18728 B (+0.0%) 1736 B (+0.0%) 816 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17712 B (+0.0%) 1424 B (+0.0%) 812 B (+0.0%) Erased 1568888832 B (+0.0%)

1bc1493 Tweaked on-disk config comments for consistency
01b6a47 Extended test_alloc to test inferred block_count
749a456 Fix DivideByZero exception when filesystem is completely full.

v2.9.1

08 Mar 23:23
4dd30c1
Compare
Choose a tag to compare
Code Stack Structs Coverage
Default 17032 B (+0.4%) 1432 B (+0.0%) 812 B (+0.0%) Lines 2391/2571 lines (-0.0%)
Readonly 6190 B (+0.1%) 448 B (+0.0%) 812 B (+0.0%) Branches 1243/1582 branches (-0.0%)
Threadsafe 17896 B (+0.3%) 1432 B (+0.0%) 820 B (+0.0%) Benchmarks
Multiversion 17096 B (+0.4%) 1432 B (+0.0%) 816 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18728 B (+0.3%) 1736 B (+0.0%) 816 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17712 B (+0.3%) 1424 B (+0.0%) 812 B (+0.0%) Erased 1568888832 B (+0.0%)

7873d81 Fixed memory leak in emubd's out-of-order write emulation
fc2aa33 Fixed issue with exhaustive + out-of-order powerloss testing
6352185 Fixed sync issue where data writes could appear before metadata writes
f2a6f45 Added out-of-order write testing to emubd
2752d8c add nim-littlefs to readme
ddbfcaa Fixed synthetic move underflows in lfs_dir_get

v2.9

23 Jan 18:59
f53a0cc
Compare
Choose a tag to compare

Itsy-bitsy breaking changes:

  • lfs_rename now returns LFS_ERR_NOTDIR if the source is a regular file and the destination is a directory. This better aligns with POSIX.

  • Defining LFS_FILE_MAX > 2147483647 is no longer supported. It's unclear if this ever worked, and at least half the file API was unusable in this state.

What's new?

  • lfs_fs_gc can now compact metadata (#913)

    This is controlled by the new optional compact_thresh configuration option. mdirs above compact_thresh will be eagerly compacted during lfs_fs_gc, making it less likely (but still possible) for compactions to occur during file writes.

    By default, compact_thresh=0, littlefs will compact mdirs > ~88% block_size. This value may change in the future.

    compact_thresh=-1 disables mdir compaction during lfs_fs_gc.

    Note that compact_thresh has no effect on mdir compaction outside of lfs_fs_gc. mdirs must compact when full.

  • Added inline_max, which allows explicit user control over the size of inlined files (#914)

    Decreasing inline_max may improve some metadata-related performance around mdir traversal. But decreasing inline_max may also hurt metadata-related performance around mdir compaction and increase storage consumption. It is up to users to determine the best value per-application.

    By default, inline_max=0, uses the largest possible inline_max. This matches the previous behavior and is probably a good default for most use cases.

    inline_max=-1 disables inlined files.

  • Added easier util overrides for common system functions: LFS_MALLOC, LFS_FREE, LFS_CRC (#909)

    These can now be overridden with simple defines:

    -DLFS_MALLOC=my_malloc
    -DLFS_FREE=my_free
    -DLFS_CRC=my_crc
    

    Note: Overriding LFS_CRC with a non-CRC32 checksum is discouraged. This is only intended for hardware acceleration, etc.

  • Thanks to @tomscii, lfs_rename now returns LFS_ERR_NOTDIR if the source is a regular file and the destination is a directory, which better matches POSIX (#917)

  • Thanks to @BrianPugh, defining overridable limits (LFS_FILE_MAX, LFS_NAME_MAX, LFS_ATTR_MAX) to incompatible values will now result in a compile error (#886)

  • Relaxed lookahead buffer alignment to only be byte-aligned (#912)

  • Relaxed lfs_malloc alignment requirements to only be byte-aligned (#912)

Changes

Code Stack Structs Coverage
Default 16972 B (+0.9%) 1432 B (-1.1%) 812 B (+1.5%) Lines 2387/2566 lines (-0.1%)
Readonly 6186 B (+0.9%) 448 B (+0.0%) 812 B (+1.5%) Branches 1239/1576 branches (-0.1%)
Threadsafe 17836 B (+0.8%) 1432 B (-1.1%) 820 B (+1.5%) Benchmarks
Multiversion 17036 B (+0.9%) 1432 B (-1.1%) 816 B (+1.5%) Readed 29369693876 B (+0.0%)
Migrate 18664 B (+0.8%) 1736 B (-0.9%) 816 B (+1.5%) Proged 1482874766 B (+0.0%)
Error-asserts 17660 B (+1.0%) 1424 B (-1.1%) 812 B (+1.5%) Erased 1568888832 B (+0.0%)

42910bc Bumped minor version to v2.9
a70870c Renamed internal functions _raw* -> *
8b8fd14 Added inline_max, to optionally limit the size of inlined files
b5cd957 Extended lfs_fs_gc to compact metadata, compact_thresh
f522ed9 Added tests over rename type errors
4f32738 Fix return value of lfs_rename()
6691718 Restricted LFS_FILE_MAX to signed 32-bits, <2^31, <=2147483647
1fefcbb Rearranged compile-time constant checks to live near lfs_init
6056767 Relaxed alignment requirements for lfs_malloc
897b571 Changed CI to just run on ubuntu-latest
b1b10c0 Relaxed lookahead buffer alignment
1f9c3c0 Reworked the block allocator so the logic is hopefully simpler
7b68441 Renamed a number of internal block-allocator fields
9a620c7 Added LFS_CRC, easier override for lfs_crc
a0c6c54 Added LFS_MALLOC/FREE, easier overrides for lfs_malloc/free
c531a5e Replace erroneous LFS_FILE_MAX upper bound 4294967296 to 4294967295
8f9427d Add value-range checks for user-definable macros

Sponsors

A special thanks to littlefs's sponsors: @nedap, @kmetabg, @fusedFET

v2.8.2

21 Dec 06:59
3513ff1
Compare
Choose a tag to compare

Changes

Code Stack Structs Coverage
Default 16828 B (+0.0%) 1448 B (+0.0%) 800 B (+0.0%) Lines 2357/2533 lines (+0.0%)
Readonly 6130 B (+0.0%) 448 B (+0.0%) 800 B (+0.0%) Branches 1202/1528 branches (+0.0%)
Threadsafe 17696 B (+0.0%) 1448 B (+0.0%) 808 B (+0.0%) Benchmarks
Multiversion 16892 B (+0.0%) 1448 B (+0.0%) 804 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18508 B (+0.0%) 1752 B (+0.0%) 804 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17484 B (+0.0%) 1440 B (+0.0%) 800 B (+0.0%) Erased 1568888832 B (+0.0%)

99b84ee Update DESIGN.md, fix minor typo
e91a29d Fixed struct sizes missing from generated release notes
b9b95ab Increase threshold for superblock expansion from ~50% -> ~88% full
10bcff1 Update DESIGN.md minor typo

Contributors

A special thanks to all who proposed PRs: @zchen24

Sponsors

And a special thanks to littlefs's sponsors: @nedap, @kmetabg, @fusedFET

v2.8.1

31 Oct 19:00
c733d9e
Compare
Choose a tag to compare
Code Stack Structs Coverage
Default 16820 B (-0.1%) 1448 B (+0.0%) 800 B (+0.0%) Lines 2357/2533 lines (+0.0%)
Readonly 6130 B (+0.0%) 448 B (+0.0%) 800 B (+0.0%) Branches 1202/1528 branches (+0.0%)
Threadsafe 17688 B (-0.2%) 1448 B (+0.0%) 808 B (+0.0%) Benchmarks
Multiversion 16884 B (-0.1%) 1448 B (+0.0%) 804 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18500 B (-0.1%) 1752 B (+0.0%) 804 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17480 B (-0.1%) 1440 B (+0.0%) 800 B (+0.0%) Erased 1568888832 B (+0.0%)

8f3f32d Added -Wmissing-prototypes
92fc780 lfs_fs_raw* functions should be static

v2.8

22 Sep 17:44
f77214d
Compare
Choose a tag to compare

This release brings in some useful community-driven features.

What's new?

  • Thanks to @BrianPugh, littlefs no longer needs the block_count when mounting an existing filesystem (#866)

    Simply set block_count=0 in your configuration, and littlefs will automatically determine the block_count based on what's on disk. This allows you to mount a filesystem of unknown size.

  • Added lfs_fs_grow which allows you to change the size of an existing filesystem, thanks to @kaetemi (#872)

    The main use case is for changing the size of a partition as storage requirements change.

    Note: littlefs does not support shrinking a filesystem, and this is unlikely to change (it's a hard problem).

  • Added lfs_fs_gc which allows you to manually run the block allocator, thanks to @opilat (#875)

    Note: littlefs currently does not persist any found free blocks to disk, though this may change in the future.

    This limits the current value of lfs_fs_gc, but it may still be useful for moving the expensive block scan out of performance sensitive code paths.

Changes

Code Stack Structs Coverage
Default 16838 B (+1.0%) 1448 B (+1.1%) 800 B (+1.5%) Lines 2357/2533 lines (+0.3%)
Readonly 6130 B (+0.1%) 448 B (+0.0%) 800 B (+1.5%) Branches 1202/1528 branches (+0.1%)
Threadsafe 17722 B (+1.2%) 1448 B (+1.1%) 808 B (+1.5%) Benchmarks
Multiversion 16898 B (+0.9%) 1448 B (+1.1%) 804 B (+1.5%) Readed 29369693876 B (+0.0%)
Migrate 18514 B (+0.8%) 1752 B (+0.9%) 804 B (+1.5%) Proged 1482874766 B (+0.0%)
Error-asserts 17498 B (+1.1%) 1440 B (+1.1%) 800 B (+1.5%) Erased 1568888832 B (+0.0%)

f91c5bd Bumped minor version to v2.8
6b33ee5 Renamed lfs_fs_findfreeblocks -> lfs_fs_gc, tweaked documentation
63e4408 Extended alloc tests to test some properties of lfs_fs_findfreeblocks
dbe4598 Added API boilerplate for lfs_fs_findfreeblocks and consistent style
d85a0fe Move lookahead buffer offset at the first free block if such block doesn't exist move it for whole lookahead size.
b637379 Update lfs_find_free_blocks to match the latest changes.
23505fa Added lfs_fs_grow for growing the filesystem to a different block_count
2c222af Tweaked lfs_fsinfo block_size/block_count fields
127d84b Added a couple mixed/unknown block_count tests
027331b Adopted erase_size/erase_count config in test block-devices/runners
9c23329 Revert of refactor lfs_scan_* out of lfs_format
23089d5 remove previous block_count detection from lfs_format
d6098bd Add block_count and block_size to fsinfo
d6c0c6a linting
5caa83f forgot to unmount lfs in test; leaking memory
7521e0a fix newly introduced missing cleanup when an invalid superblock is found.
2ebfec7 test for failure when interpretting block count when formatting without superblock
3d0bcf4 Add test_superblocks_mount_unknown_block_count
6de3fc6 fix corruption check
df238eb Add a unit test; currently hanging on final permutation.
be68122 introduce lfs->block_count. If cfg->block_count is 0, autopopulate from superblock
6dae703 remove redundant superblock check
7328527 refactor lfs_scan_for_state_updates and lfs_scan_for_superblock out of lfs_format

v2.7.1

03 Sep 18:50
130790f
Compare
Choose a tag to compare
Code Stack Structs Coverage
Default 16678 B (+0.1%) 1432 B (+0.0%) 788 B (+0.0%) Lines 2316/2496 lines (+0.0%)
Readonly 6126 B (+0.0%) 448 B (+0.0%) 788 B (+0.0%) Branches 1184/1506 branches (-0.0%)
Threadsafe 17506 B (+0.1%) 1432 B (+0.0%) 796 B (+0.0%) Benchmarks
Multiversion 16754 B (+0.1%) 1432 B (+0.0%) 792 B (+0.0%) Readed 29369693876 B (+0.0%)
Migrate 18362 B (+0.1%) 1736 B (+0.0%) 792 B (+0.0%) Proged 1482874766 B (+0.0%)
Error-asserts 17310 B (+0.0%) 1424 B (+0.0%) 788 B (+0.0%) Erased 1568888832 B (+0.0%)

5a834b6 initlize struct lfs_diskoff disk = {0} so we don't use it uninitlized in first run
d775b46 Fixed integer conversion warning from Code Composer Studio
96fb8be Fixed release script breaking if there is no previous version

v2.7

30 Jun 18:37
611c9b2
Compare
Choose a tag to compare

This is a small release to add some features that help with the previous on-disk minor-version bump, per feedback from @rojer, @TjoBitDk, and others.

What's new?

  • Added lfs_fs_stat as an analog for the POSIX stavfs (#838)

    This now provides access to the on-disk format-time configuration:

    • disk_version - on-disk version
    • name_max - configurable name limit
    • file_max - configurable name limit
    • attr_max - configurable name limit

    And may be extended in the future. Notably, the current block avail/usage is missing due to performance concerns, but can be retrieved with an explicit call to lfs_fs_size.

  • Added support for writing previous on-disk minor-versions (#839)

    This feature is behind a compile-time flag, so in order to write lfs2.0 you need to compile with LFS_MULTIVERSION defined. LFS_MULTIVERSION enables an additional config option, disk_version, which currently supports three options:

    • disk_version=0 => write the most recent littlefs version
    • disk_version=0x00020001 => write lfs2.1
    • disk_version=0x00020000 => write lfs2.0 (no FCRC)

Changes

Code Stack Structs Coverage
Default 16666 B (+0.7%) 1432 B (+0.0%) 788 B (+2.1%) Lines 2316/2496 lines (+0.1%)
Readonly 6126 B (+2.3%) 448 B (+0.0%) 788 B (+2.1%) Branches 1184/1506 branches (+0.1%)
Threadsafe 17494 B (+0.8%) 1432 B (+0.0%) 796 B (+2.1%) Benchmarks
Multiversion 16742 B 1432 B 792 B Readed 29369693876 B (+0.0%)
Migrate 18350 B (+0.6%) 1736 B (+0.0%) 792 B (+2.1%) Proged 1482874766 B (+0.0%)
Error-asserts 17302 B (+0.6%) 1424 B (+0.0%) 788 B (+2.1%) Erased 1568888832 B (+0.0%)

a942cdb Bumped minor version to v2.7
79cc75d Added LFS_MULTIVERSION and testing of lfs2.0 to CI
eb9af7a Added LFS_MULTIVERSION, made lfs2.0 support a compile-time option
b72c96d Added support for writing on-disk version lfs2.0
265692e Removed fsinfo.block_usage for now
08a132e Added a link to ChaN's FatFS implementation
c5fb3f1 Changed fsinfo.minor_version -> fsinfo.disk_version
8610f7c Increased context on failures for Valgrind in CI
a51be18 Removed previous-version lfsp_fs_stat checks in test_compat
a7ccc1d Promoted lfs_gstate_needssuperblock to be available in readonly builds
fdee127 Removed use of LFS_VERSION in test_compat
87bbf1d Added lfs_fs_stat for access to filesystem status/configuration

v2.6.1

23 May 20:52
66f0756
Compare
Choose a tag to compare
Code Stack Structs Coverage
Default 16556 B (+0.0%) 1432 B (+0.0%) 772 B (+0.0%) Lines 2289/2469 lines (-0.0%)
Readonly 5990 B (+0.0%) 448 B (+0.0%) 772 B (+0.0%) Branches 1174/1496 branches (+0.0%)
Threadsafe 17362 B (+0.0%) 1432 B (+0.0%) 780 B (+0.0%) Benchmarks
Migrate 18240 B (+0.0%) 1736 B (+0.0%) 776 B (+0.0%) Readed 29369693876 B (+0.0%)
Error-asserts 17192 B (+0.0%) 1424 B (+0.0%) 772 B (+0.0%) Proged 1482874766 B (+0.0%)
Erased 1568888832 B (+0.0%)

8a4ee65 Removed unnecessary sys/types.h include
6fda813 Fix build for AVR
f2bc6a8 Reclassify .toml files as .c files on GitHub