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

Question about spiffs_obj_id sizing #283

Open
jcwren opened this issue Nov 10, 2021 · 1 comment
Open

Question about spiffs_obj_id sizing #283

jcwren opened this issue Nov 10, 2021 · 1 comment

Comments

@jcwren
Copy link

jcwren commented Nov 10, 2021

I have a board with a 16MB flash on it. When I configured SPIFFS way back when I declared spiffs_obj_id as a uint16_t. The system has been working well enough for a long time, but I also don't create a lot files. There's normally about 20 files, and one of them is a large file that's basically a database that gets a fair number of writes to it. As I was looking at the configuration for a different reason, it appears I should have declared spiffs_obj_id to be a uint32_t.

What are the implications of it being too small? I've spent a while trying to follow what happens to obj_id, but there's so many references to it in different structures that it rapidly gets confusing to keep track of what's what.

As near as I can suss out, as long as I have less than 32766 files ('objects') on the file system, I should be OK?

Thanks!

@pellepl
Copy link
Owner

pellepl commented Nov 11, 2021 via email

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

No branches or pull requests

2 participants