-
Notifications
You must be signed in to change notification settings - Fork 18
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
Use fsync()/fdatasync() to prevent possible data corruption #13
Comments
Can you be more descriptive what possible corruption, where? If you want things to get addressed you'll have to be more descriptive and explain what and why you want things changed. |
Also how portable are fsync()/fdatasync()? |
Simple scenario:
The same may happen during internal qcow2 data manipulation. You should understand that any incomplete write (not acknowledged by For example, qemu-img never corrupts image structure. And if write operations in it is complete, data is really permanent. |
fdatasync:
|
Also, we need an option to inhibit fsyncing like qemu-img's |
https://www.humboldt.co.uk/fsync-across-platforms/
Libqcow does not write images at this point in time. |
Much better would be implementing of all caching modes of qemu - i.e. write-back, write-through, unsafe, none, directsync. Don't know if it is possible to work with qcow2 file in O_DIRECT mode, since it requires all IO to be page-aligned. |
O! sorry, I did not know that libqcow2 is read-only. Just started to do experiments (and read really works). |
Thx for the suggestion. I close this issue for now and revisit if/when write is added. |
No description provided.
The text was updated successfully, but these errors were encountered: