Open ken4647 opened 2 months ago
Great find!
FWIW, the commit that added the datasync
argument to the kernel is torvalds/linux@b165d60145b717261a0234f989c442c2b68b6ec0 (from 2010)
I was able to run the tests/kern
tests after applying the workaround in #101, and found that t15 passes, which is probably how this went unnoticed for so long.
In In the description of this project,
fsync
is formatted to this:However, in linux and qemu, it should be like this:
,while it means fsync both content and metadata when datasync[4] is
0
, and1
means fsync content only.The implement in Linux's 9p client is below:![image](https://github.com/chaos/diod/assets/87317372/a2ee780a-4597-4f0b-8be9-c253611aff9a)
I also conducted experiments based on the qemu‘s 9pfs backend and proved that the
datasync
field is necessary.Is this inconsistency caused by some reason?