forked from esp8266/Arduino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Free space of overwritten files in LittleFS (esp8266#7434)
* Free space of overwritten files in LittleFS Fixes esp8266#7426 LittleFS doesn't update the on-flash data structures when a file is reopened as O_TRUNC until the file is closed. This means the space of the original, inaccessible file cannot be used, causing OOS errors in cases when a large file is being overwritten. Explicitly call the file sync operation to update the on-flash metadata as soon as a file is opened. For normal files it's a no-op, but for O_TRUNC modes it will free the space, allowing full overwrite of large files. * Add host test case for change
- Loading branch information
1 parent
d979b57
commit c663c55
Showing
2 changed files
with
23 additions
and
0 deletions.
There are no files selected for viewing
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
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