All of lore.kernel.org
 help / color / mirror / Atom feed
From: Chuck Lever <chuck.lever@oracle.com>
To: Trond Myklebust <trond.myklebust@fys.uio.no>
Cc: Linux NFS mailing list <nfs@lists.sourceforge.net>
Subject: Re: nfs_refresh_verifier / nfs_renew_times confusion
Date: Wed, 19 Sep 2007 16:48:18 -0400	[thread overview]
Message-ID: <46F18B12.4000802@oracle.com> (raw)
In-Reply-To: <1190234217.6734.57.camel@heimdal.trondhjem.org>

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

Trond Myklebust wrote:
> Time to clean all that up. The legacy nfs_renew_times() has no meaning
> now that we use d_time to cache the verifier. Would you like to send me
> a patch removing them?

I can -- there are some minor nits.

In nfs_dentry_iput() we have this:

static void nfs_dentry_iput(struct dentry *dentry, struct inode *inode)
{
         nfs_inode_return_delegation(inode);
         if (S_ISDIR(inode->i_mode))
                 /* drop any readdir cache as it could easily be old */
                 NFS_I(inode)->cache_validity |= NFS_INO_INVALID_DATA;

         if (dentry->d_flags & DCACHE_NFSFS_RENAMED) {
                 lock_kernel();
                 drop_nlink(inode);
                 nfs_complete_unlink(dentry, inode);
                 unlock_kernel();
         }
         /* When creating a negative dentry, we want to renew d_time */
         nfs_renew_times(dentry);
         ^^^^^^^^^^^^^^^^^^^^^^^^
         iput(inode);
}

This is the only instance of nfs_renew_times() by itself.  Seems like 
this might break the behavior of negative dentry caching.  Should this 
be removed entirely, or replaced somehow with nfs_refresh_verifier()?

It looks like nfs_set_verifier() and nfs_refresh_verifier() reduce to 
exactly the same logic, but we have this at the end of nfs_readdir_lookup:

         nfs_renew_times(dentry);
         nfs_set_verifier(dentry, nfs_save_change_attribute(dir));
         return dentry;
out_renew:
         nfs_renew_times(dentry);
         nfs_refresh_verifier(dentry, nfs_save_change_attribute(dir));
         return dentry;
}

Both of which are exactly equivalent now.  I can address this as well.

[-- Attachment #2: chuck.lever.vcf --]
[-- Type: text/x-vcard, Size: 290 bytes --]

begin:vcard
fn:Chuck Lever
n:Lever;Chuck
org:Oracle Corporation;Corporate Architecture: Linux Projects Group
adr:;;1015 Granger Avenue;Ann Arbor;MI;48104;USA
title:Principal Member of Staff
tel;work:+1 248 614 5091
x-mozilla-html:FALSE
url:http://oss.oracle.com/~cel
version:2.1
end:vcard


[-- Attachment #3: Type: text/plain, Size: 228 bytes --]

-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2005.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/

[-- Attachment #4: Type: text/plain, Size: 140 bytes --]

_______________________________________________
NFS maillist  -  NFS@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/nfs

  reply	other threads:[~2007-09-19 20:49 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-09-19 20:20 nfs_refresh_verifier / nfs_renew_times confusion Chuck Lever
2007-09-19 20:36 ` Trond Myklebust
2007-09-19 20:48   ` Chuck Lever [this message]
2007-09-19 20:57     ` 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=46F18B12.4000802@oracle.com \
    --to=chuck.lever@oracle.com \
    --cc=nfs@lists.sourceforge.net \
    --cc=trond.myklebust@fys.uio.no \
    /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.