Re: O_DIRECT foolish question

From: Chris Wedgwood (
Date: Wed Feb 12 2003 - 17:42:26 EST

On Wed, Feb 12, 2003 at 05:29:52PM -0500, Bruno Diniz de Paula wrote:

> But I am using multiples of page size in both buffer alignment and
> buffer size (2nd and 3rd parameters of read). The issue is that
> when I try to read files with sizes that are NOT multiples of block
> size (and therefore also not multiples of page size), the read
> syscall returns 0, with no errors.

What filesystem?

Can you send an strace of this occurring?

> So the question remains, am I able to read just files whose size is
> a multiple of block size?


You ideally should be able to read any length file with O_DIRECT.
Even a 1-byte file.

To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to
More majordomo info at
Please read the FAQ at

This archive was generated by hypermail 2b29 : Sat Feb 15 2003 - 22:00:45 EST