The following patch stops memory mapped corruption due to pages not being flushed in a timely matter. This patch is for the 2.4.20 kernel. The Problem: The corruption occurred when 300 of the File System Exerciser (fsx) processes are started simultaneously. These processes do random mmap-ed read/writes, file truncations, normal reads/writes, and opens/closes one on data file. Just to make things more interesting, each process opens a logging file and output file in the same directory (a total of three files per process). The corruption occurred on one of the data files after 3 to 5 mins. The Cause: Memory mapped pages were not being flushed out in a timely manner. When a file is about to truncated (up or down), nfs_writepage() is called (by filemap_fdatasync()) to flush out dirty pages. When this done asynchronously, nfs_writepage() will (indirectly) call nfs_strategy(). nfs_strategy() wants to send groups of pages (in this case 4 pages). Now in the error case, only one page was dirty so it was *not* flushed out. Eventually that page would be flushed (by kupdate) but it was too late because the file size had already change due to a second truncation. My Solution: When a file is going to be truncated down (i.e. the file is going to shrink), _synchronously_ flush out the mmapped pages. I used the (unused) NFS_INO_FLUSH flag be to tell nfs_writepage to synchronously write out the page. This sync write *only* occurs when there are dirty mmapped pages and the file size is going to shrink. And then only the mmapped pages are written out synchronously so there should very little affect on I/O performance due to this synchronization. Definitely worth the price of correctness, IMHO.... SteveD.