littlefs-project / littlefs

A little fail-safe filesystem designed for microcontrollers
BSD 3-Clause "New" or "Revised" License
4.9k stars 770 forks source link

On the issue of tag structure #1000

Open pine-fish opened 3 days ago

pine-fish commented 3 days ago

I tried to dump the LFS data and read it, but I found that the structure introduced in SPEC.md does not match my data Here is a portion of my data 02 00 00 00 F0 0F FF F7 6C 69 74 74 6C 65 66 73 2F E0 00 10 00 00 02 00 00 10 00 00 8E 00 00 00 FF 00 00 00 FF FF FF 7F FE 03 00 00 70 1F FC 08 F0 28 5E BC FF FF FF FF FF FF FF FF FF FF FF FF 10 1F F8 10 40 00 00 07 31 31 31 2E 62 69 6E 20 00 00 07 70 1F F8 09 DA CE D0 DD FF FF FF FF FF 10 1F F4 09 40 00 00 08 32 32 32 32 2E 68 65 78 20 00 00 08 70 1F F4 08 DE E3 63 56 FF FF FF FF 10 1F F0 08 40 00 00 09 33 33 33 33 33 2E 6A 70 67 20 00 00 09 70 1F F0 07 01 C5 9C E7 FF FF FF

1 I found the file names 111.bin, 2222hex, and 33333.jpg, but they have not saved any data yet. Taking 111. bin as an example, the first few bytes of the file name should be its corresponding tag, right? The first byte 07 before the file name also corresponds to the length of the file name, but a few more bytes before it seem to have a different file structure than the one in the screenshot? I cannot read any correct information based on this structure. Is it because the tag was XOR that the data cannot be read directly? Can anyone explain this structure in layman's terms? Thanks!