diff options
author | Trond Myklebust <trond.myklebust@primarydata.com> | 2015-10-01 18:38:27 -0400 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2015-10-22 14:43:18 -0700 |
commit | 896f0858ce91e3207ea5bd59abc23fb58b2c159a (patch) | |
tree | f22a82a9ea397f8de37a6807d704b07f13f3d238 /fs/nfs | |
parent | 0fe83960ecd61b82fb436728712330b61b47d53a (diff) | |
download | lwn-896f0858ce91e3207ea5bd59abc23fb58b2c159a.tar.gz lwn-896f0858ce91e3207ea5bd59abc23fb58b2c159a.zip |
NFS: Fix a write performance regression
commit 8fa4592a14ebb3c22a21d846d1e4f65dab7d1a7c upstream.
If all other conditions in nfs_can_extend_write() are met, and there
are no locks, then we should be able to assume close-to-open semantics
and the ability to extend our write to cover the whole page.
With this patch, the xfstests generic/074 test completes in 242s instead
of >1400s on my test rig.
Fixes: bd61e0a9c852 ("locks: convert posix locks to file_lock_context")
Cc: Jeff Layton <jlayton@primarydata.com>
Signed-off-by: Trond Myklebust <trond.myklebust@primarydata.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'fs/nfs')
-rw-r--r-- | fs/nfs/write.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/fs/nfs/write.c b/fs/nfs/write.c index 1fe9cbe6445a..d9851a6a2813 100644 --- a/fs/nfs/write.c +++ b/fs/nfs/write.c @@ -1203,7 +1203,7 @@ static int nfs_can_extend_write(struct file *file, struct page *page, struct ino return 1; if (!flctx || (list_empty_careful(&flctx->flc_flock) && list_empty_careful(&flctx->flc_posix))) - return 0; + return 1; /* Check to see if there are whole file write locks */ ret = 0; |