On 24 August 2016 at 06:27, Hallvard Breien Furuseth
<h.b.furuseth@usit.uio.no <mailto:h.b.furuseth@usit.uio.no>> wrote:
The unix version only uses O_DIRECT if psize >= OS psize
because O_DIRECT typically requires alignment on OS page
boundaries, or something like that. Should be commented.
Didn't find anything similar in the Windows doc, but again,
I don't know Windows. Maybe Howard knows more.
According to man 2 open O_DIRECT alignment is file system specific from 2.6
onwards, but "usually" 512bytes FWIW. Not sure how that would affect this code.