lkml.org 
[lkml]   [2003]   [Feb]   [12]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
Date
From
SubjectRe: O_DIRECT foolish question
On Wed, Feb 12, 2003 at 04:19:24PM -0500, Bruno Diniz de Paula wrote:

> I am trying to use O_DIRECT to read ordinary files and read syscall
> always returns 0, unless when the file size equals the fs block
> size.

Sounds correct.

> Is it true that I can only use O_DIRECT when the size of the file
> written in the inode is a multiple of block size?

You usually can only do O_DIRECT reads/writes in multiples of the
block size (or in some cases multiples of 512-bytes, but I'm not sure
of that code is still about though).

It depends on the filesystem to some extent.


--cw
-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/

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