[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support
New submission from George Melikov : POSIX fdatasync() is similar to fsync() but it tries not to sync non-needed metadata. If POSIX OS doesn't have it - it's safe to use fsync() (If we need to sync data to disk - we have to use one of these functions). This change will help to run code with fdatasync() on MacOS without fallbacks in Python code. I'll propose a PR soon. -- components: IO messages: 362025 nosy: gmelikov priority: normal severity: normal status: open title: fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support ___ Python tracker <https://bugs.python.org/issue39640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support
Change by George Melikov : -- keywords: +patch pull_requests: +17893 stage: -> patch review pull_request: https://github.com/python/cpython/pull/18516 ___ Python tracker <https://bugs.python.org/issue39640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support
George Melikov added the comment: If there is a way not to sync data - you should use neither fdatasync nor fsync. So IMHO if someone wants to sync data and want to use fdatasync - I see the only way on MacOS is to use fsync(). > 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. I agree, but I propose to make this change in 3.9 to get it somewhere in future. -- ___ Python tracker <https://bugs.python.org/issue39640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support
George Melikov added the comment: I want to add that it's a usual practice: - https://github.com/libuv/libuv/pull/1580/files/bdd987a9b4347164e31e22d2d5ce06fbb5ebc859 - https://rev.ng/gitlab/revng/qemu/commit/6f1953c4c14566d3303709869fd26201828b3ccf -- ___ Python tracker <https://bugs.python.org/issue39640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com
[issue39640] fall back os.fdatasync() to fsync() on POSIX systems without fdatasync() support
George Melikov added the comment: PR rebased and ready to review. -- ___ Python tracker <https://bugs.python.org/issue39640> ___ ___ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com