Fixed issue with directories falling out of date after block relocation

This is caused by dir->head not being updated when dir->m.pair may be.
This causes the two to fall out of sync and later dir rewinds to fail.

This bug stems all the way back from the first commits of littlefs, so
it's surprising it has avoided detection for this long. Perhaps because
lfs_dir_rewind is not used often.
This commit is contained in:
Christopher Haster
2019-11-14 14:25:42 -06:00
parent 6b65737715
commit aae22c8256
3 changed files with 95 additions and 2 deletions

View File

@@ -55,6 +55,7 @@ test: \
test_attrs \
test_move \
test_orphan \
test_relocations \
test_corrupt
@rm test.c
test_%: tests/test_%.sh