New submission from Paul <paul.carli...@gmail.com>:
The following Python3 script fails. import mmap import os fd = os.open(path_to_file, os.O_DIRECT | os.O_RDWR) fo = os.fdopen(fd, 'rb+') m = mmap.mmap(-1, 4096) fo.readinto(m) But it worked for Python2. It also works for any other multiple of 4K. For example: m = mmap.mmap(-1, 8192) fo.readinto(m) Is fine! ---------- components: IO messages: 352397 nosy: yoyoyopcp priority: normal severity: normal status: open title: O_DIRECT read fails with 4K mmap buffer type: behavior versions: Python 3.5, Python 3.6, Python 3.7, Python 3.8, Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue38167> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com