On Wed, 2008-08-13 at 12:16 +0200, Jan Kara wrote: > > With that said, I don't have strong feelings against falling back to > > buffered IO when the invalidate fails. Maybe Zach remembers something I > > don't? > I don't have a strong opinion either. Falling back to buffered writes is > simpler at least for ext3/ext4 because properly synchronizing against > writepage() call does not seem to have a nice solution either in > do_launder_page() or in releasepage(). OTOH is hides the fact the invalidate > is failing and so if we screw up something in future and it fails often, it > might be hard to notice / track down the performance penalty. In general, these races don't happen often, and when they do it is because someone is mixing page cache and O_DIRECT io to the same file. That is explicitly outside the main use case of O_DIRECT. So, I'd rather see us slow down O_DIRECT in the mixed use case than have big impacts in complexity or speed to other parts of the kernel. If falling back avoids problems in some filesystems or avoids clearing the uptodate bit unexpectedly, I'd much rather take the fallback patch. -chris -- To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html