On Thu, Jun 03, 2010 at 09:34:18PM -0400, Martin K. Petersen wrote: > >>>>> "Dave" == Dave Chinner <david@xxxxxxxxxxxxx> writes: > > Dave> If you are running DIF hardware, then XFS is only OK for direct > Dave> IO. XFS will still get torn writes if you are overwriting > Dave> buffered data (either by write() or mmap()) because there are no > Dave> interlocks to prevent cached pages under writeback from being > Dave> modified while DMA is being performed..... > > Didn't you use to wait_on_page_writeback() in page_mkwrite()? The generic implementation of ->page_mkwrite (block_page_mkwrite()) which XFS uses has never had a wait_on_page_writeback() call in it. There's no call in the generic write paths, either, hence my comment that only direct IO on XFS will work. It should be noted that metadata updates in XFS are already protected against torn writes - buffers are held locked during IO, and can only be modified while holding the lock. Hence the only problem that needs solving for XFS to make full use of DIF/DIX is getting the page cache paths to not modify pages under IO... Cheers, Dave. -- Dave Chinner david@xxxxxxxxxxxxx -- 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