All of lore.kernel.org
 help / color / mirror / Atom feed
From: Mike Waychison <Michael.Waychison@Sun.COM>
To: Steve Dickson <SteveD@redhat.com>
Cc: linux-nfs <nfs@lists.sourceforge.net>
Subject: Re: [NFS][PATCH] Making sure negative lookup entries don't exist
Date: Fri, 28 Jan 2005 20:08:08 -0500	[thread overview]
Message-ID: <41FAE1F8.3040307@sun.com> (raw)
In-Reply-To: <41FA88D5.6010904@RedHat.com>

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Steve Dickson wrote:
> 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.
> 
> 
> ------------------------------------------------------------------------
> 
> --- 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;

I don't think this is needed.  Aren't you guaranteed that a root dentry
will never have ->d_revalidate called?

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

Am I missing something? or doesn't nfs_check_verifier do exactly these
checks already?

- --
Mike Waychison
Sun Microsystems, Inc.
1 (650) 352-5299 voice
1 (416) 202-8336 voice

~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
NOTICE:  The opinions expressed in this email are held by me,
and may not represent the views of Sun Microsystems, Inc.
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB+uH3dQs4kOxk3/MRArnXAJsGRs/yb8fazMcgB/T1l5K+o0O3qQCfXBEg
+C712kBY6Nhp78X1qelIwe4=
=AAyH
-----END PGP SIGNATURE-----


-------------------------------------------------------
This SF.Net email is sponsored by: IntelliVIEW -- Interactive Reporting
Tool for open source databases. Create drag-&-drop reports. Save time
by over 75%! Publish reports on the web. Export to DOC, XLS, RTF, etc.
Download a FREE copy at http://www.intelliview.com/go/osdn_nl
_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2005-01-29  1:08 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-01-28 18:47 [NFS][PATCH] Making sure negative lookup entries don't exist Steve Dickson
2005-01-29  1:08 ` Mike Waychison [this message]
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=41FAE1F8.3040307@sun.com \
    --to=michael.waychison@sun.com \
    --cc=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.