On 24 August 2016 at 10:30, Hallvard Breien Furuseth < h.b.furuseth@usit.uio.no> wrote:
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.
Yes, that makes sense of course. I googled around for documentation on some of the more obscure Unixes, but it is hard to come by.
I don't have legal sign-off yet and am abroad until the beginning of September. I'll pick up submitting the patch then.