You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Following code write 1MB to the file "test" and immediately checks for the file size via fstat. The result should be 1MB, but is actually 0. However, when I start the program a second time with a existing file the result is correct.
It looks like this issue might be a bit more complicated to solve. FUSE apparently doesn't use fgetattr instead uses the path-based stat to satisfy fstat (related discussion). This unfortunately doesn't work on littlefs, because littlefs doesn't keep any RAM structures to know what files are in-flight, and instead relies on disk updates.
I'll have to see if there's a way to work around this. Worse case, littlefs-fuse might have to keep a dictionary of all open paths.
Hmm, that sounds indeed difficult. Didn't know, that this is a an issue of FUSE. When I close and reopen the file before I check the file size it works.
Following code write 1MB to the file "test" and immediately checks for the file size via fstat. The result should be 1MB, but is actually 0. However, when I start the program a second time with a existing file the result is correct.
The text was updated successfully, but these errors were encountered: