All of lore.kernel.org
 help / color / mirror / Atom feed
* [NFS][PATCH] Making sure negative lookup entries don't exist
@ 2005-01-28 18:47 Steve Dickson
  2005-01-29  1:08 ` Mike Waychison
  2005-01-29  3:05 ` Trond Myklebust
  0 siblings, 2 replies; 6+ messages in thread
From: Steve Dickson @ 2005-01-28 18:47 UTC (permalink / raw)
  To: linux-nfs

[-- Attachment #1: Type: text/plain, Size: 326 bytes --]

Here is a 2.4.28 patch that ensures negative cached dirents
do not exist by always doing an otw getattr to the server.
This does cause a small increase in getattrs (~3% from what
I saw in my testing) but it seems to me the price is worth it to
ensure the client does not lie about the existence of a file.

comments?

steved.

[-- Attachment #2: linux-2.4.28-nfs-negcache.patch --]
[-- Type: text/x-patch, Size: 568 bytes --]

--- linux-2.4.28/fs/nfs/dir.c.orig	2004-08-07 19:26:06.000000000 -0400
+++ linux-2.4.28/fs/nfs/dir.c	2005-01-28 13:00:59.402239000 -0500
@@ -455,7 +455,11 @@ int nfs_lookup_verify_inode(struct inode
  */
 static inline int nfs_neg_need_reval(struct inode *dir, struct dentry *dentry)
 {
-	if (!nfs_check_verifier(dir, dentry))
+	if (IS_ROOT(dentry))
+		return 1;
+	if (__nfs_revalidate_inode(NFS_SERVER(dir), dir))
+		return 1;
+	if (time_after(NFS_MTIME_UPDATE(dir), dentry->d_time))
 		return 1;
 	return time_after(jiffies, dentry->d_time + NFS_ATTRTIMEO(dir));
 }

^ permalink raw reply	[flat|nested] 6+ messages in thread

end of thread, other threads:[~2005-01-29 19:33 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-01-28 18:47 [NFS][PATCH] Making sure negative lookup entries don't exist Steve Dickson
2005-01-29  1:08 ` Mike Waychison
2005-01-29 12:32   ` Steve Dickson
2005-01-29  3:05 ` Trond Myklebust
2005-01-29 12:59   ` Steve Dickson
2005-01-29 19:32     ` Trond Myklebust

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.