> From: Trond Myklebust <Trond.Myklebust@netapp.com>> > invalidate_inode_pages2() should not try to fix races between direct_IO and> mmap(). It should only be trying to clear out pages that were dirty before> the direct_IO write (see generic_file_direct_IO()).> Skipping dirty pages should therefore not result in an error.>

This change worries me. It's a very bad situation if we leave dirtypagecache sitting over a piece of the file which is about to be either reador written via direct-IO. As far as the application is concerned, itpretty much guarantees impending data corruption and I do think we need totell the application the bad news and not just pretend that things are allOK.