Messages in this thread Patch in this message | | | Date | Fri, 12 Nov 2004 16:22:11 -0800 | From | Badari Pulavarty <> | Subject | 2.6.10-rc1-mm2 DIO failures |
| |
Hi Andrew,
I see LTP DIO test failures on 2.6.10-rc1-mm2 while doing direct-IO write to filesystem files.
This is due to the changes in generic_file_direct_IO(). I haven't looked at what exactly happening here (whats faling with page shoot down). But we end up getting -EIO.
/* - * Called under i_sem for writes to S_ISREG files + * Called under i_sem for writes to S_ISREG files. Returns -EIO if something + * went wrong during pagecache shootdown. */ ssize_t generic_file_direct_IO(int rw, struct kiocb *iocb, const struct iovec *iov, @@ -2539,14 +2540,24 @@ generic_file_direct_IO(int rw, struct ki struct address_space *mapping = file->f_mapping; ssize_t retval;
+ /* + * If it's a write, unmap all mmappings of the file up-front. This + * will cause any pte dirty bits to be propagated into the pageframes + * for the subsequent filemap_write_and_wait(). + */ + if (rw == WRITE && mapping_mapped(mapping)) + unmap_mapping_range(mapping, 0, -1, 0); ...
Thanks, Badari
# ./diotest2 diotest02 1 PASS : Read with Direct IO, Write without write failed:Input/output error [2] Write Direct failed diotest02 2 FAIL : Write with Direct IO, Read without diotest02 3 PASS : Read, Write with Direct IO diotest2 1/3 testblocks failed - 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/
| |