Comments (3)
Hi @alex31, thanks for creating an issue. This shouldn't happen, as far as I'm aware there's no known power-loss issues, but of course there's always the possibility of an unknown bug.
Is it a known problem with littlefs, or is it the internal moves done by the sdcard firmware that are responsible of the corruption ?
I would be a bit suspicious of the SD card. They are quite a bit more complex than raw NOR/NAND flash, so probably take a bit more encouragement to actual persist writes to disk. littlefs's bd sync
function needs to send whatever is equivalent to sync to the SD card and wait for it to complete, or else the filesystem state can become corrupted.
I would also not put it past cheaper SD cards to ignore sync commands/ordering given 199% of them end up formatted with FAT anyways. It may be worth trying SD cards from different manufacturers to see if the problem is consistent.
from littlefs.
Thanks for the answer, I am refining my testbench to have more statistics with different brand of sdcard. I also ordered "integral security sd card", a brand that have a line of micro sd card where the firmware is written to be failsafe on power loss, at the depend of performance. I have implemented __lfs_sd_sync to send sync CMD to the sdcard, so problem should no be on that side, more on the internal SD card firmware that is not guaranteed to be failsafe IMHO.
from littlefs.
Related Issues (20)
- lfs_dir_getslice(): why do we subtract gdiff from gtag? HOT 17
- Read and write data issue.
- Suspicious comparison at `lfs_dir_find_match()` HOT 6
- Mount LittleFS loop device using standard mount command HOT 2
- Littlle Fs Multiple partition Issue HOT 4
- Is it possible to store multiple file in one erase block? HOT 3
- Delete branches on merge. HOT 1
- Tags with id == 0x3ff HOT 2
- Proper way to read from a W25Q128JV flash, using Adafruit_SPIFlash HOT 5
- user_provided_block_device_prog HOT 3
- lfs_file_write() return a error message of LFS_ERR_NOENT HOT 8
- Provide option to use string arguments that are not null-terminated HOT 7
- Zephyr OS little FS file system Write timeing issue HOT 1
- Blocks 0 and 1 becoming corrupted whilst creating just 1 file - Problem confirmed as block count being anything other than 512. HOT 1
- Metadata can't be compacted below block_size/2 ? HOT 2
- Exposing tracking counters for wear analysis and other performance analysis (erase, write, and read block counters) HOT 1
- Feature Request: Extra programming buffer for metadata or waiting to commit the new file until closed? HOT 7
- data loss in littlefs HOT 2
- Mounting a loop device from c. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from littlefs.