-
Notifications
You must be signed in to change notification settings - Fork 29
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
Why is fsync calling fdsync #83
Comments
This offers speed advantages, and if journaling is enabled on the file system, there is significantly small potential risk of data loss. |
The point is:
|
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Long story short
The
fsync
code inAIOFile.fsync
ends up callingfdsync
:aiofile/aiofile/aio.py
Line 292 in 647da78
Is there a particular reason for this? I assume
fsync
andfdatasync
have differences under the hood (at OS level) andfsync
is slower but more detailed in what it flushes (eg. inBSD
systems). For those who care about these detailsfsync -> fdsync
could be unexpected and misleading.Expected behavior
fsync
should callfsync
and a new API should be exposed forfdsync
which maps to the underlying context'sfdsync
.The text was updated successfully, but these errors were encountered: