Skip to content
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

Only update LittleFS timestamp when opened write #6956

Merged
merged 2 commits into from
Dec 30, 2019

Conversation

earlephilhower
Copy link
Collaborator

Fixes #6955

LittleFS was updating the timestamp on any close, not only for files
when they were opened for writing. This could lead to excessive writes
to the flash.

Preserve the LFS flags, and only update the timestamp if the file was
opened for writing.

@earlephilhower earlephilhower added this to the 2.7.0 milestone Dec 28, 2019
Fixes esp8266#6955

LittleFS was updating the timestamp on any close, not only for files
when they were opened for writing.  This could lead to excessive writes
to the flash.

Preserve the LFS flags, and only update the timestamp if the file was
opened for writing.
@earlephilhower earlephilhower merged commit fa5040d into esp8266:master Dec 30, 2019
@earlephilhower earlephilhower deleted the fixtime branch December 30, 2019 23:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

LittleFS timestamp last write is also changed after a file is only read.
1 participant