On 24. aug. 2016 11:02, Lorenz Bauer wrote: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.
I gather you mean Linux 2.6. But O_DIRECT is not Linux-specific, I
don't know of a portable way to ask "is this alignment big enough?",
and the code breaks if we use O_DIRECT when the OS doesn't like it.
So we simply assume the OS page size is OK.