-
Notifications
You must be signed in to change notification settings - Fork 13.3k
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
Deprecate SPIFFS, move examples to LittleFS #7263
Conversation
Apps which use SPIFFS will get warnings like the following, but will still run fine:
|
Fixes #7095 |
SPIFFS has been a great filesystem, but it has significant problems in many cases (and it's also pretty slow). Development seems to have slowed/stopped on the upstream version, and we're not able to provide support or fix the known issues with it as-is. Deprecate SPIFFS variable. Update all examples to use LittleFS instead of SPIFFS. Also, minor cleanup on very old examples which has obsolete delays waiting for the Serial port to come up, or which were stuck at 9600 baud because of their ancient AVR heritage. Fixes esp8266#7095
7d2d812
to
2e5ee76
Compare
c6504ba
to
d588f4f
Compare
The new deprecation warning, shows the direct line SPIFFS is used:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Too bad about the speedtest, I've actually used a variation of that to check a module's FS. Could that sketch maybe be refactored for "some" FS defined at the top? I.e.: change a define to use for LittleFS or SD or XYZ, with LittleFS being the default?
Approving anyways.
@devyte, I can leave in the SpeedTest.ino. But, since there isn't another supported internal FS, I'm really not sure what the purpose would be. Let me know and I can re-add. |
The original intent was to contrast SPIFFS vs LittleFS performance in one run. Even without SPIFFS, this could serve to contrast e. g. LittleFS vs SD, or SD with one type of card vs another type of card, by running the sketch multiple times and collecting the results. |
This should have been done in a minor or major release, not in maintenance. |
It was intended for 2.7.0 but didn't make it to the cutoff. We're not killing it in 2.7.1, just giving everyone heads-up. You can still use your SPIFFS setup if desired in 2.7.1. |
I am also concerned about this change. Not against it however. How about the "Sketch Data Upload" function of the Arduino IDE, is there a similar tool to copy files from PC to ESP32's persistant memory? |
LittleFS is indeed a drop-in / transparent replacement for SPIFFS. Just replace all occurrence of About uploading: https://arduino-esp8266.readthedocs.io/en/latest/filesystem.html?highlight=LittleFS#uploading-files-to-file-system |
This filesystem deprecation is kinda crazy considering that there are millions of devices with important data on SPIFFS out there. Without a semi-automated and safe way of transforming SPIFFS to LittleFS (if it's possible at all, probably not in a truly safe way) people will have to either ignore the deprecation warning or ignore new releases. |
Fair points, @joysfera, but deprecation doesn't mean we're dropping it immediately. No new designs should be using SPIFFS due to a bunch of known problems and low performance. It's not really supported upstream, and we're not equipped to do the maintenance ourselves. So if it works, great. If there's a problem, we're not going to spend time on it (but will always accept PRs!)... |
@joysfera be that as it may, SPIFFS has known issues and limitations, and given the lack of activity of the upstream repo in the past 3 years, they're unlikely to be addressed there any time soon. We won't investigate SPIFFS related issues due to upstream code, and there's no upstream maintainer, so deprecation it is. As for migration, it's as simple as downloading the files from SPIFFS to some local storage, updating the sketch to LittleFS, and then uploading either the files or a LittleFS image made with the files. Exactly how that migration is implemented depends on each individual user app or 3rd party infrastructure, so it can't be specific to the core. |
You seem to forget about the devices in the field, not on developers' desks. Those are not accessible, you cannot download their files to some local storage, reformat the FS and upload the files back. Think millions of Sonoff devices, for example. |
Example of an automatic upgrade path:
Questions: is it possible to shrink SPIFFS? Is it possible to locate LittleFS in the freed space? Issues:
|
Yes, @joysfera , that sounds strikingly like the process I remember Windows 95(?) going through when converting FAT32 to NTFS. We'd be happy to look at any PR you come up with! You might want to chime in on littlefs-project/littlefs#238 where someone is going through a similar exercise. |
SPIFFS has been a great filesystem, but it has significant problems in
many cases (and it's also pretty slow). Development seems to have
slowed/stopped on the upstream version, and we're not able to provide
support or fix the known issues with it as-is.
Deprecate SPIFFS variable.
Update all examples to use LittleFS instead of SPIFFS.
Also, minor cleanup on very old examples which has obsolete delays
waiting for the Serial port to come up, or which were stuck at 9600 baud
because of their ancient AVR heritage.
Fixes #7095