Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

There may be a inconsistency or mistake in description for fsync of 9P2000.L . #101

Open
ken4647 opened this issue Jul 6, 2024 · 1 comment

Comments

@ken4647
Copy link

ken4647 commented Jul 6, 2024

In In the description of this project, fsync is formatted to this:

size[4] Tfsync tag[2] fid[4]

However, in linux and qemu, it should be like this:

size[4] Tfsync tag[2] fid[4] datasync[4]

,while it means fsync both content and metadata when datasync[4] is 0 , and 1 means fsync content only.

The implement in Linux's 9p client is below:
image

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?

@garlick
Copy link
Member

garlick commented Jul 6, 2024

Great find!

FWIW, the commit that added the datasync argument to the kernel is torvalds/linux@b165d60 (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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants