mirror of https://github.com/ARMmbed/mbed-os.git
Rather than tracking all in-flight blocks blocks during a lookahead, littlefs uses an ack scheme to mark the first allocated block that hasn't reached the disk yet. littlefs assumes all blocks since the last ack are bad or in-flight, and uses this to know when it's out of storage. However, these unacked allocations were still being populated in the lookahead buffer. If the whole block device fits in the lookahead buffer, _and_ littlefs managed to scan around the whole storage while an unacked block was still in-flight, it would assume the block was free and misallocate it. The fix is to only fill the lookahead buffer up to the last ack. The internal free structure was restructured to simplify the runtime calculation of lookahead size. |
||
---|---|---|
.. | ||
bd | ||
fat | ||
littlefs | ||
Dir.cpp | ||
Dir.h | ||
File.cpp | ||
File.h | ||
FileSystem.cpp | ||
FileSystem.h | ||
mbed_filesystem.h | ||
mbed_lib.json |