Open grandemk opened 1 year ago
@grandemk Sorry for the long delay.
Could you elaborate more on (Note that there is a correlation between this bug and the fact that it passes in the Cleanup then Read behaviour documented in the Dokan documentation and mentionned in #1016. I couldn't replicate it without having the Cleanup then Read behavior.)
?
Did you changed the sample for it to work or fail ?
Hi, I didn't change the mirror sample.
Mostly, some sizes of the file Test1.txt trigger the bug, so I just tweaked the content of Test1.txt until the bug occured (with, for example the file I linked).
From what I remember, I talked about correlation because I could get two path of execution in the Mirror Sample when I read the content of the file:
Create -> Read -> Cleanup
(normal path of execution)Create -> Cleanup -> Read
(the path that can happen with mmaped file)While tweaking the content of Test1.txt to trigger the bug, I would only see 2. Create -> Cleanup -> Read
when I reproduced the bug.
This would be called only one time, and then subsequent Read wouldn't show any calls to the Mirror Sample Dokan API Implementation, as if the information was cached before the user space driver and wasn't correctly invalidated in some case (probably related to some kind of rounding in page size, as writing enough data would at some point invalidate this cache and the correct data would be read.)
Environment
Check List
Description
Hi :)
The changes done in the root directory of the mirror do not seem to be mirrored in some cases related to memory mapping. The change in the size of the file is detected, but the content is wrong at the end of the file.
This problem appears in the mirror default sample. Here is a 100% reproduction of the problem.
Test1.txt used for the reproduction (you need a file sufficiently big for the error to occur) Test1.txt
(Note that there is a correlation between this bug and the fact that it passes in the Cleanup then Read behaviour documented in the Dokan documentation and mentionned in https://github.com/dokan-dev/dokany/issues/1016. I couldn't replicate it without having the Cleanup then Read behavior.)