linux-nfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/1] NFS: dont revalidate the inode when using local locks
@ 2012-10-03 23:08 Fred Isaman
  0 siblings, 0 replies; only message in thread
From: Fred Isaman @ 2012-10-03 23:08 UTC (permalink / raw)
  To: linux-nfs; +Cc: Trond Myklebust

This drastically improves performance when using lock-heavy workloads that are amenable to using local locks.

Signed-off-by: Fred Isaman <iisaman@netapp.com>
---
 fs/nfs/file.c |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/fs/nfs/file.c b/fs/nfs/file.c
index a6708e6..fd0155f 100644
--- a/fs/nfs/file.c
+++ b/fs/nfs/file.c
@@ -765,7 +765,7 @@ do_setlk(struct file *filp, int cmd, struct file_lock *fl, int is_local)
 	 * This makes locking act as a cache coherency point.
 	 */
 	nfs_sync_mapping(filp->f_mapping);
-	if (!nfs_have_delegation(inode, FMODE_READ)) {
+	if ((!is_local) && !nfs_have_delegation(inode, FMODE_READ)) {
 		if (is_time_granular(&NFS_SERVER(inode)->time_delta))
 			__nfs_revalidate_inode(NFS_SERVER(inode), inode);
 		else
-- 
1.7.1


^ permalink raw reply related	[flat|nested] only message in thread

only message in thread, other threads:[~2012-10-03 23:08 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-10-03 23:08 [PATCH 1/1] NFS: dont revalidate the inode when using local locks Fred Isaman

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).