lkml.org 
[lkml]   [2003]   [Apr]   [4]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    /
    SubjectRe: [NFS] [PATCH] mmap corruption
    From
    Date
    >>>>> " " == 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/

    \
     
     \ /
      Last update: 2005-03-22 13:34    [W:0.020 / U:242.240 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site