[lkml]   [2002]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
Messages in this thread
SubjectO_DIRECT broken in 2.5.3-preX ?

I am reading the O_DIRECT code patch for 2.5.3-pre4. I was wondering
how is this working in 2.5.X ? Here is my concern:

generic_direct_IO() creates a blocks[] list and passes it to
brw_kiovec() with a single kiobuf.

retval = brw_kiovec(rw, 1, &iobuf, inode->i_dev, blocks, blocksize);

But brw_kiovec() uses only b[0] to call ll_rw_bio().

for (i = 0; i < nr; i++) {
iobuf = iovec[i];
iobuf->errno = 0;

ll_rw_kio(rw, iobuf, dev, b[i] * (size >> 9));

Note that nr = 1 here. ll_rw_kio() uses b[0] as starting sector
and does the entire IO (for iobuf->length). This is wrong !!!
It is doing IO from wrong blocks. Some one should use other
block numbers from blocks[] list. Isn't it ?

What am I missing here ? Please let me know.

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:15    [W:0.093 / U:24.264 seconds]
©2003-2018 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site