mirror of https://github.com/ARMmbed/mbed-os.git
Like most of the lfs_dir_t functions, lfs_dir_append is responsible for updating the lfs_dir_t struct if the underlying directory block is moved. This property makes handling worn out blocks much easier by removing the amount of state that needs to be considered during a directory update. However, extending the dir chain is a bit of a corner case. It's not changing the old block, but callers of lfs_dir_append do assume the "entry" will reside in "dir" after lfs_dir_append completes. This issue only occurs when creating files, since mkdir does not use the entry after lfs_dir_append. Unfortunately, the tests against extending the directory chain were all made using mkdir. Found by schouleu |
||
---|---|---|
.. | ||
bd | ||
fat | ||
littlefs | ||
Dir.cpp | ||
Dir.h | ||
File.cpp | ||
File.h | ||
FileSystem.cpp | ||
FileSystem.h | ||
mbed_filesystem.h | ||
mbed_lib.json |