All of lore.kernel.org
 help / color / mirror / Atom feed
From: Steve Dickson <SteveD@redhat.com>
To: linux-nfs <nfs@lists.sourceforge.net>
Subject: [NFS][PATCH] Making sure negative lookup entries don't exist
Date: Fri, 28 Jan 2005 13:47:49 -0500	[thread overview]
Message-ID: <41FA88D5.6010904@RedHat.com> (raw)

[-- 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));
 }

             reply	other threads:[~2005-01-28 18:46 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-28 18:47 Steve Dickson [this message]
2005-01-29  1:08 ` [NFS][PATCH] Making sure negative lookup entries don't exist 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

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=41FA88D5.6010904@RedHat.com \
    --to=steved@redhat.com \
    --cc=nfs@lists.sourceforge.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.