Skip to content

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

Merged
merged 4 commits into from
May 30, 2019

Conversation

earlephilhower
Copy link
Collaborator

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.

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.
@earlephilhower earlephilhower requested review from d-a-v and devyte May 27, 2019 20:29
Copy link
Collaborator

@d-a-v d-a-v left a 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

@d-a-v d-a-v requested a review from devyte May 29, 2019 09:17
Copy link
Collaborator

@devyte devyte left a 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.

@earlephilhower earlephilhower merged commit 44bda41 into esp8266:master May 30, 2019
@earlephilhower earlephilhower deleted the fsinfo64 branch May 30, 2019 17:52
@earlephilhower
Copy link
Collaborator Author

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...

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.

wrapper SDFS.info(FSInfo& info) is overflowed for SD Cards > 4GB
3 participants