]> git.hungrycats.org Git - linux/commit
[PATCH] nfs: Optimize away unnecessary NFSv3 COMMIT calls.
authorAndrew Morton <akpm@osdl.org>
Mon, 19 Jan 2004 02:39:05 +0000 (18:39 -0800)
committerLinus Torvalds <torvalds@home.osdl.org>
Mon, 19 Jan 2004 02:39:05 +0000 (18:39 -0800)
commitac48c0dd475ea672113ccb0d3bc2ef41dc3f85ac
treede5ab8c09ee14811fb5a8ff13fa4d2907c2311fd
parent2f4c9a2db4ec756c26d871bb201cfd9c73cf55a3
[PATCH] nfs: Optimize away unnecessary NFSv3 COMMIT calls.

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.
fs/nfs/write.c