Skip to content

v2: How does LittleFS calculate the physical address of a block? #1160

@insiberias

Description

@insiberias

Hello LittleFS team,

We are studying this file system for a project and when I was reading the DESIGN.md file I was left with a question.

In the chapter about CTZ skip-lists, you say it is only needed to store a pointer to the head of the list, and size.

My question is, in the configuration structure, we do not specify any page size, and blocks are made of pages. I confess I am learning about reading and programming flash memory as I learn about LittleFS, but the program granularity in, for example, NAND flash memory is page and not block, so how does LittleFS handle the offset in this situation, since page sizes can vary? In NOR flash memory I think the program granularity is word and since LittleFS uses 32 bit words that makes things easy, but I am curious for NAND flash also.

Also, some memories to get the address of a block also need information of the plane the block is in, if you can comment on this it would help my curiosity a bit, or even point us toward the functions that handle this internally would also be helpful. 😃

Regardless, thank you. 😅

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions