All of lore.kernel.org
 help / color / mirror / Atom feed
From: David Howells <dhowells@redhat.com>
To: viro@zeniv.linux.org.uk, trond.myklebust@fys.uio.no
Cc: nfsv4@linux-nfs.org, linux-fsdevel@vger.kernel.org, dhowells@redhat.com
Subject: d_revalidate not being called enough on mountpoints?
Date: Mon, 16 Apr 2007 13:50:24 +0100	[thread overview]
Message-ID: <8505.1176727824@redhat.com> (raw)


Hi Al,

I think there might be a problem in the VFS with d_revalidate() not being
called enough on mountpoints.  As far as I can tell from the printks in my AFS
stuff, it's only called on the mounted-on dentry, and not the vfsmount-root
dentry.  However, with NFS at least (not so much AFS), can you trust that the
mount-root dentry still maps to the same inode and event if it does that that
inode is still up to date?

I discovered it because I was relying on d_revalidate() to spot that the
server had broken the callback on a directory that had been changed.  However,
the root directory of each volume isn't being d_revalidated.

In the kernel output, I see:

(1) Permission check on the root dir of /afs: volume ID 20000001, vnode ID 1:

[0ls    ] ==> afs_permission({20000001:1},1,)

(2) Revalidation of the mountpoint dir in /afs (vnode ID 6):

[0ls    ] ==> afs_d_revalidate({v={20000001:6} n=.cambridge.redhat.com fl=20},)
[0ls    ]     not promised

(3) At this point, the stats of the mounted-on dir are rechecked.

[0ls    ]     new promise [fl=20]

(4) Permission check on the root dir of /afs/.cambridge.redhat.com (volume ID
    20000003, vnode ID 1):

[0ls    ] ==> afs_permission({20000003:1},1,)

(5) Revalidation of the mountpoint dir in /afs/.cambridge.redhat.com (vnode ID
    2):

[0ls    ] ==> afs_d_revalidate({v={20000003:2} n=afsdoc fl=20},)
[0ls    ]     not promised

(6) Again, the stats of the mounted-on dir are rechecked.

[0ls    ]     new promise [fl=20]

I was expecting to see the root dentry of each vfsmount be revalidated, but
that doesn't occur.

David

             reply	other threads:[~2007-04-16 12:50 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2007-04-16 12:50 David Howells [this message]
2007-04-16 13:38 ` d_revalidate not being called enough on mountpoints? Trond Myklebust
2007-04-16 14:18   ` David Howells

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=8505.1176727824@redhat.com \
    --to=dhowells@redhat.com \
    --cc=linux-fsdevel@vger.kernel.org \
    --cc=nfsv4@linux-nfs.org \
    --cc=trond.myklebust@fys.uio.no \
    --cc=viro@zeniv.linux.org.uk \
    /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.