All of lore.kernel.org
 help / color / mirror / Atom feed
* nfs_refresh_verifier / nfs_renew_times confusion
@ 2007-09-19 20:20 Chuck Lever
  2007-09-19 20:36 ` Trond Myklebust
  0 siblings, 1 reply; 4+ messages in thread
From: Chuck Lever @ 2007-09-19 20:20 UTC (permalink / raw)
  To: Trond Myklebust, Linux NFS mailing list

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

Hi Trond-

I'm reviewing 2.6.23-rc6 + NFS_ALL to prepare for porting my BKL 
elimination patch series.  I'm confused by a couple of things I found in 
fs/nfs/dir.c.

1.

static int nfs_check_verifier(struct inode *dir, struct dentry *dentry)
{
         unsigned long verf;

         if (IS_ROOT(dentry))
                 return 1;
         verf = dentry->d_time;
         if (nfs_caches_unstable(dir)
                         || verf != NFS_I(dir)->cache_change_attribute)
                 return 0;
         return 1;
}

Why use the extra variable "verf" here?

2.

Three functions are defined:

static inline void nfs_set_verifier(struct dentry * dentry, unsigned 
long verf)
{
         dentry->d_time = verf;
}

static void nfs_refresh_verifier(struct dentry * dentry, unsigned long verf)
{
         nfs_set_verifier(dentry, verf);
}

static inline void nfs_renew_times(struct dentry * dentry)
{
         dentry->d_time = jiffies;
}

but later in the code I see this sequence several times:

         nfs_renew_times(dentry);
         nfs_refresh_verifier(dentry, verifier);

as well as this sequence:

         nfs_renew_times(dentry);
         nfs_set_verifier(dentry, nfs_save_change_attribute(dir));

In both cases, the second call overwrites the dentry's d_time field 
which was set to "jiffies" in the first call.

[-- 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

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

end of thread, other threads:[~2007-09-19 20:58 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
2007-09-19 20:57     ` 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.