Re: [NFS] [PATCH] mmap corruption

From: Trond Myklebust (trond.myklebust@fys.uio.no)
Date: Fri Apr 04 2003 - 17:01:02 EST


>>>>> " " == Steve Dickson <SteveD@redhat.com> writes:

> 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.

That simply doesn't ring true. The nfs_wb_all() immediately after the
call to filemap_fdatasync() should ensure that *all* scheduled writes
will flushed out.

Cheers,
  Trond
-
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/



This archive was generated by hypermail 2b29 : Mon Apr 07 2003 - 22:00:24 EST