Open test-sg opened 1 year ago
Hi @test-sg, this can be found using the lfs_fs_traverse
function, which takes a callback and calls it with every block address currently in use by the filesystem:
As for finding all of the blocks not in use, littlefs doesn't really know this. It needs to be constructed by looking at each block and seeing if it is in-use.
littlefs does this a window at a time, which is what the lookahead_size
configuration option controls.
Does anyone has the sample code to print out the 'status' of all the fs blocks, whether each of the block has been allocated? For example, like below, all the 128 blocks?