lkml.org 
[lkml]   [2002]   [Jan]   [24]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
/
From
SubjectO_DIRECT broken in 2.5.3-preX ?
Date
Hi,

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.

Thanks,
Badari
-
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:15    [W:0.855 / U:0.056 seconds]
©2003-2020 Jasper Spaans|hosted at Digital Ocean and TransIP|Read the blog|Advertise on this site