2.6.10 - direct-io async short read bug
Quoted 9 lines · Andrew Morton
Quoted 6 lines · Suparna Bhattacharya
...
Bugs in this area seem never-ending don't they - plug one, open up another - hard to be confident/verify :( - someday we'll have to rewrite a part of this code.
It's solving a complex problem. Any rewrite would probably end up
just as
Quoted 13 lines
hairy once all the new bugs and corner cases are fixed. Maybe.
Quoted 10 lines
Hmm, shouldn't
dio->resultideally have been adjusted to be withini_sizeat the time of io submission, so we don't have to deal with this during completion ? We are creating bios with the right size after all.We have this:
if (!buffer_mapped(map_bh)) { .... if (dio->block_in_file >=
i_size_read(dio->inode)>>blkbits) {
Quoted 8 lines
Quoted 8 lines
/* We hit eof */ page_cache_release(page); goto out; }and
dio->result += iov[seg].iov_len - ((dio->final_block_in_request -
dio->block_in_file) <<
Quoted 11 lines
Quoted 5 lines
blkbits);can you spot what is going wrong here that we have to try and workaround this later ?
Good question. Do we have the
i_semcoverage to prevent a concurrent truncate?But from Sebastien's description it doesn't soound as if a concurrent truncate is involved.
Yes, you're right, there's no concurrent truncate here. My test case as well as Daniel's is single threaded and is the only thread accessing the file.
Regards,
Sébastien.
Signature · 10 lines
------------------------------------------------------ Sébastien Dugué BULL/FREC:B1-247 phone: (+33) 476 29 77 70 Bullcom: 229-7770 mailto:[email protected] Linux POSIX AIO: http://www.bullopensource.org/posix ------------------------------------------------------