Josh Rosenberg <shadowranger+pyt...@gmail.com> added the comment:
> I do not believe an unbuffered file uses O_DIRECT. This is why I use > os.open(fpath, os.O_DIRECT). Problem is you follow it with: fo = os.fdopen(fd, 'rb+') which introduces a Python level of buffering around the kernel unbuffered file descriptor. You'd need to pass buffering=0 to make os.fdopen avoid returning a buffered file object, making it: fo = os.fdopen(fd, 'rb+', buffering=0) ---------- _______________________________________ 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