Skip to content

A few easy suggestions.. #571

Open
Open
@JonJust

Description

@JonJust

Hi there,

I have been working on implementing LittleFS as part of a larger project I have been working on. I am newer to embedded development, so I wanted to share some of my experiences and difficulties.

I had two really big difficulties when implementing the file system. The number one issue I had was that it took me a while to realize that the user disk i/o functions were being passed block and page indexes, not addresses. I feel that this could have been a little more explicitly spelled out in lfs.h. I'm sure something like this would be more apparent to seasoned devs, but to me it was a little unintuitive.

Secondly, the file system does not verify erases in the same way that it verifies writes. Whenever you go to do a write, you will get an error response if the write ends up corrupted for whatever reason. This made it MUCH easier to pinpoint an issue with writes. Erases, however, will not give you an error response should they not go through. I had an issue with my erase function and it caused all sorts of strange issues; files over writing, "successful" writes with files disappearing, the file system corrupting, etc. I think that it would be handy to add a few lines of code verifying erases, and to return an error should an erase fail.

With that said, the system is working wonderfully, and is capable of doing what it needs to do. Thanks for all your hard work @geky !

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions