-
Notifications
You must be signed in to change notification settings - Fork 12
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
LittleFS port #121
Open
jmaksymowicz
wants to merge
7
commits into
master
Choose a base branch
from
jmaksymowicz/littlefs
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Open
LittleFS port #121
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Imported littlefs v2.8.1 from https://github.com/littlefs-project/littlefs commit c733d9ec5776dfc949ec6dc71fa9ce3ff71de6e5 JIRA: RTOS-686
remove trailing whitespace fix comments to satisfy codespell JIRA: RTOS-686
change error handling in lfs_fs_rawgrow() JIRA: RTOS-686
move block device operations to separate file export selected functions from lfs.c JIRA: RTOS-686
JIRA: RTOS-686
link function implemented as "move" JIRA: RTOS-686
jmaksymowicz
force-pushed
the
jmaksymowicz/littlefs
branch
from
February 14, 2024 12:50
bdaceb3
to
b92ebe9
Compare
fix compilation warnings with 32-bit IDs add API for mounting with explicit configuration JIRA: RTOS-686
jmaksymowicz
force-pushed
the
jmaksymowicz/littlefs
branch
from
March 14, 2024 16:32
754c75d
to
7019e91
Compare
13 tasks
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Adds support for LittleFS filesystem to Phoenix RTOS.
Description
LittleFS is a high-integrity filesystem designed for use on relatively small Flash memory devices. This driver allows the use of LittleFS with Phoenix RTOS.
Because of the requirements of Phoenix RTOS API, every file is given a unique numeric identifier that is stored on disk. To achieve good performance, after a path lookup the ID of the file, along with its location on the disk, is cached in memory. In case of a cache miss, the entire file system needs to be scanned to find the file corresponding to an ID. In practice, most file operations in Phoenix RTOS are preceded by a lookup operation, so the requested file's data is very likely cached in memory (unless the cache is too small).
This driver can handle situations where a file has no ID stored on disk - in this case, an ID will be written to disk upon lookup or (if mounted in read-only mode) stored permanently in memory.
Due to the construction of LittleFS, hard links were not implemented. As a result, this driver is not fully compatible with Phoenix RTOS API, which expects the
link
syscall to create hard links andunlink
to remove them. Instead, in this driverlink
renames a file andunlink
removes a file. As a result, the "rename" operation in Phoenix RTOS - which is implemented as alink
thenunlink
- always fails due to theunlink
operation failing to find the file (which has already been moved bylink
).Sparse files are not implemented, which causes one of
libc
tests to fail.Both little-endian and big-endian systems are supported. Mounting of other filesystems within LittleFS is supported (also in read-only mode).
For now this file system has only been tested with
pc-ata
driver onia32-generic-qemu
.Motivation and Context
Due to its characteristics, LittleFS is a good filesystem for use on STM32L4 targets.
Types of changes
How Has This Been Tested?
Checklist:
Special treatment