Closed MikhailSiomin closed 4 months ago
@geky, I found that even opening an existing
file in Littlefs 2.9.3
causes Littlefs 2.2.0
to use a previous
revision's root block.
The problem is solved. To do this, it was necessary to define the LFS_MULTIVERSION
macro and, specify the supported disk version in the disk_version
field of the struct lfs_config
for mounting.
Our bootloaders work on Zephyr RTOS 2.7.6 using
LittleFS 2.2.0
, applications - on Zephyr RTOS 3.7.0-rc1 usingLittleFS 2.8.1
(the bug described below also appears withLittleFS 2.9.3
). File system is located on theW25Q128JVSIQ
chip.How I reproduce this bug:
/com
fs./com/log/log.0000
file and writes small logs./com
fs./com/logs/log.0000
file some logs./com
fs, but findscorrupted dir pair
(non-root
), then mounts empty/com
fs.But if
step 4
is interrupted afterfirst
lfs_file_sync
due to a power reset, then the bootloader findscorrupted dir pair
when the file size is around8000 bytes
or larger.I'm currently searching for the cause of this problem and would appreciate any help.