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/
This archive was generated by hypermail 2b29 : Thu Jan 31 2002 - 21:00:25 EST