Better implementation of inline files, now with overflowing

Now when a file overflows the max inline file size, it will be correctly
written out to a proper block. Additionally, tweaked corner cases around
inline file, however this still needs significant testing.

A real neat part that surprised me is that littlefs _already_ contains
the logic for writing out inline files: in lfs_file_relocate! With a bit
of tweaking, littlefs can pull off both the overflow from inline to
normal files _and_ the relocating of bad blocks in files with the same
piece of logic.
This commit is contained in:
Christopher Haster
2018-03-17 20:32:16 -05:00
parent 836e23895a
commit d8cadecba6
2 changed files with 60 additions and 33 deletions

View File

@@ -357,7 +357,7 @@ tests/test.py << TEST
TEST
echo "--- Multi-block directory with files ---"
tests/test.py -s << TEST
tests/test.py << TEST
lfs_mount(&lfs, &cfg) => 0;
lfs_mkdir(&lfs, "prickly-pear") => 0;
for (int i = 0; i < $LARGESIZE; i++) {