lkml.org 
[lkml]   [2005]   [Aug]   [31]   [last100]   RSS Feed
Views: [more markup]  [less markup]  [headers]  [forward] 
 
Messages in this thread
/
DateWed, 31 Aug 2005 10:07:45 +0200
FromJens Axboe <>
SubjectRe: A problem about DIRECT IO on ext3
On Mon, Aug 29 2005, Erik Mouw wrote:
> There are four prerequisites for direct IO:
> - the file needs to be opened with O_DIRECT
> - the buffer needs to be page aligned (hint: use getpagesize() instead
>   of assuming that a page is 4k
> - reads and writes need to happen *in* multiples of the soft block size
> - reads and writes need to happen *at* multiples of the soft block size

Actually, the buffer only needs to be hard block size aligned, same goes
for the chunk size used for reads/writes.

-- 
Jens Axboe

-
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-08-31 08:10    [from the cache]
©2003-2008