This release brings in some heavily requested minor features. Thanks to everyone who has contributed/provided feedback!
Bringing in:
886
909
912
913
914
915
916
917
Draft of release notes follows:
Itsy-bitsy teeny-tiny 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.
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_maxmay improve some metadata-related performance around mdir traversal. But decreasing inline_maxmay 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)
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)
This release brings in some heavily requested minor features. Thanks to everyone who has contributed/provided feedback!
Bringing in:
886
909
912
913
914
915
916
917
Draft of release notes follows:
Itsy-bitsy teeny-tiny 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 abovecompact_thresh
will be eagerly compacted duringlfs_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 duringlfs_fs_gc
.Note that
compact_thresh
has no effect on mdir compaction outside oflfs_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 decreasinginline_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 possibleinline_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:
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)