• Andrew Morton's avatar
    [PATCH] nfs: Optimize away unnecessary NFSv3 COMMIT calls. · ac48c0dd
    Andrew Morton authored
    Currently, when calling nfs_commit_file(), we check the range argument,
    and only commit NFS write requests that fall within the given range.
    This is silly, since all servers use fsync(), to honour a COMMIT call,
    and so will sync all pending writes to stable storage.
    
    The following patch ensures that if at least one NFS write falls within
    the range specified by the call to nfs_commit_file(), then we commit all
    outstanding writes on that file.
    
    This fixes a sometimes severe inefficiency when combining reads and
    writes: nfs_wb_page() is used to clear out writes prior to scheduling a
    read(), and can end up calling COMMIT for each page to be read.
    ac48c0dd
write.c 29.4 KB