From mboxrd@z Thu Jan 1 00:00:00 1970 From: David Howells Subject: Re: d_revalidate not being called enough on mountpoints? Date: Mon, 16 Apr 2007 15:18:24 +0100 Message-ID: <12315.1176733104@redhat.com> References: <1176730693.6761.16.camel@heimdal.trondhjem.org> <8505.1176727824@redhat.com> Cc: viro@zeniv.linux.org.uk, nfsv4@linux-nfs.org, linux-fsdevel@vger.kernel.org To: Trond Myklebust Return-path: Received: from mx1.redhat.com ([66.187.233.31]:44511 "EHLO mx1.redhat.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1030657AbXDPOSp (ORCPT ); Mon, 16 Apr 2007 10:18:45 -0400 In-Reply-To: <1176730693.6761.16.camel@heimdal.trondhjem.org> Sender: linux-fsdevel-owner@vger.kernel.org List-Id: linux-fsdevel.vger.kernel.org Trond Myklebust 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