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

Trond Myklebust <trond.myklebust@fys.uio.no> wrote:

> > 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.
> 
> That sounds like an abuse. You are not revalidating the path itself
> (which is the purpose of d_revalidate). Instead you are revalidating the
> directory metadata, which is a very different thing.

More to the point I'm attempting to revalidate the contents of the directory,
so that I can honour the next d_revalidate() call down the line.  There is no
lookup op in AFS as there is in NFS: the way things are done is that the
client's lookup parses the directory blob to map a name to a FID.

Maybe then what I need to do is revalidate the parent directory's contents in
each d_revalidate().  That has fun with rename, but if I do it under get ref
and lock, it should be okay.  I'll just have to be careful to avoid deadlock.

Alternatively, is the permission() call made prior to each d_revalidate()?  If
so, maybe I can use that:

[0ls    ] ==> afs_permission({{20000001:1},0},1,)
[0ls    ] ==> afs_d_revalidate({v={20000001:6} n=.cambridge.redhat.com fl=20},)
[0ls    ] ==> afs_permission({{20000003:1},0},1,)
[0ls    ] ==> afs_d_revalidate({v={20000003:2} n=afsdoc fl=20},)
[0ls    ] ==> afs_permission({{20000006:1},0},1,)
[0ls    ] ==> afs_d_revalidate({v={20000006:4} n=NEWS fl=0},)

Except that that doesn't get called on the last item in the chain (if I do,
say, just an ls of it).  That probably means I need to make the getattr() op
do content revalidation too.

David

      reply	other threads:[~2007-04-16 14:18 UTC|newest]

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

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=12315.1176733104@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.