[lkml]   [2001]   [Sep]   [3]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectRe: using O_DIRECT
On Mon, Sep 03, 2001 at 03:13:42PM -0500, Bob McElrath wrote:
> I have written a small program to use O_DIRECT (attached), after
> applying your patch o_direct-14 to kernel 2.4.9. Opening the file with
> O_DIRECT is successful, but attempts to write to the fd return EINVAL.
> Am I doing something wrong? Should I have to recompile glibc too?

eh, the alignment and size of the buffer have basically the same
restrictions of running read/write on a raw device, with the only
difference that for rawio the granularity is the hardblocksize, while
for O_DIRECT the granularity is the softblocksize of the filesystem.

We'll have to relax the granularity of the I/O down to the hardblocksize
for O_DIRECT too eventually.

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

 \ /
  Last update: 2005-03-22 13:17    [W:0.101 / U:5.460 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site