-
Notifications
You must be signed in to change notification settings - Fork 13.3k
Add FS::info64 call for fielsystems > 4GB #6154
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
Conversation
Fixes esp8266#6082 Add an info64() call which returns used and total sizes as 64 bit quantities. A default wrapper that just copies the 32-bit values is included for LittleFS/SPIFFS which can't hit those capacities.
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.
agree with @devyte's comments, other than that: LGTM
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.
Minor nitpick: The LittleFS and SPIFFS info64() are wrong for > 4GB because they go through the 32b info(). Doesn't matter because ESPs with such flash size don't exist, but in theory it could be possible to decouple the FS from the underlying storage (work ongoing elsewhere), and then you could instantiate on some other media.
Maybe add a comment about it?
Not a stopper or anything so approving.
While it may be possible to do a multiGB LittleFS or SPIFFS, I think they'd both fall over and die right now because of the assumptions they're baked into things. Like defining sizes in terms or int32 everywhere. If some decoupling occurs (it could today, just shim the flash_write to do SPI writes to an external chip) we can definitely revisit this, but my guess is they'd need to rewrite LFS/SPIFFS on-chip format in an incompatible way so would end up making a "new" FS anyway... |
Fixes #6082
Add an info64() call which returns used and total sizes as 64 bit
quantities. A default wrapper that just copies the 32-bit values is
included for LittleFS/SPIFFS which can't hit those capacities.