-
Notifications
You must be signed in to change notification settings - Fork 937
Open
Labels
needs investigationno idea what is wrongno idea what is wrong
Description
Hi, I don't know if what we're doing is supported but reporting in case this is a bug.
We have a following situation.
Filesystem has been created with LittleFS 2.5.0.
Library build flags LFS_NO_MALLOC.
// Major (top-nibble), incremented on backwards incompatible changes
// Minor (bottom-nibble), incremented on feature additions
#define LFS_VERSION 0x00020005
#define LFS_VERSION_MAJOR (0xffff & (LFS_VERSION >> 16))
#define LFS_VERSION_MINOR (0xffff & (LFS_VERSION >> 0))
// Version of On-disk data structures
// Major (top-nibble), incremented on backwards incompatible changes
// Minor (bottom-nibble), incremented on feature additions
#define LFS_DISK_VERSION 0x00020000
#define LFS_DISK_VERSION_MAJOR (0xffff & (LFS_DISK_VERSION >> 16))
#define LFS_DISK_VERSION_MINOR (0xffff & (LFS_DISK_VERSION >> 0))
The we upgraded code to use LittleFS 2.11.2
Library build flags LFS_NO_MALLOC and LFS_MULTIVERSION
// Major (top-nibble), incremented on backwards incompatible changes
// Minor (bottom-nibble), incremented on feature additions
#define LFS_VERSION 0x0002000b
#define LFS_VERSION_MAJOR (0xffff & (LFS_VERSION >> 16))
#define LFS_VERSION_MINOR (0xffff & (LFS_VERSION >> 0))
// Version of On-disk data structures
// Major (top-nibble), incremented on backwards incompatible changes
// Minor (bottom-nibble), incremented on feature additions
#define LFS_DISK_VERSION 0x00020001
#define LFS_DISK_VERSION_MAJOR (0xffff & (LFS_DISK_VERSION >> 16))
#define LFS_DISK_VERSION_MINOR (0xffff & (LFS_DISK_VERSION >> 0))
Reproduction (not sure if this is the minimal but it triggers the problem always):
- Format file system in v2.5.0. Create directories e.g. "/a" and /b"
- Mount file system in v2.11.2.
- Write a file in directory a. e.g. "/a/x.bin"
- Rename it to the other directory "/a/x.bin" -> "/b/x.bin"
- And finally delete the file "/b/x.bin".
- Attempt to mount file system with v2.5.0.
What happens:
lfs_mount returns error -84, filesystem corrupted.
Metadata
Metadata
Assignees
Labels
needs investigationno idea what is wrongno idea what is wrong