[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support

Serhiy Storchaka report at bugs.python.org
Sat Feb 15 14:35:40 EST 2020


Serhiy Storchaka <storchaka+cpython at gmail.com> added the comment:

fsync() may be slower than fdatasync(). There may be cases in which you prefer to not call fsync() or call it less often if POSIX fdatasync() is not available. To do this you should know whether Python fdatasync() calls POSIX fdatasync() or fsync(). The simplest way to provide this information to user is to not provide os.fdatasync() in the underlying system call is not available.

Note also that this change will not help to run code with fdatasync() on MacOS without fallbacks in Python code until you drop support of all Python versions older than 3.9.

----------
nosy: +serhiy.storchaka

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue39640>
_______________________________________


More information about the Python-bugs-list mailing list