[Lustre-devel] Attribute caching and OBD_CONNECT_ATTRFID

Andreas Dilger andreas.dilger at oracle.com
Mon Jun 21 07:34:15 PDT 2010

On 2010-06-20, at 20:42, Ken Hornstein <kenh at cmf.nrl.navy.mil> wrote:
> Now here's a thought: if I get a broken lock on a vnode, I can tell  
> the
> upper layer to invalidate the name->vnode mapping (can I do that?   
> Yes,
> it turns out I can).  That will mean lookup() will be called the  
> next time
> around.  I think in terms of RPC round-trip, a GETATTR is the same  
> as a
> LOOKUP, right?  It feels kinda wrong to do it that way, though.

This is in fact the right way to do it. If the lock is cancelledq then  
the client has no way of knowing whether that name will continue to  
point at the same FID or not.

Also note we recently changed the Linux client to invalidate the inode  
when all of the DLM locks related to that inode are cancelled.  This  
ensures the client 'forgets' about deleted inodes even when another  
client deleted it. Otherwise, the client will accumulate a lot of  
unnecessary inodes in cache.

Cheers, Andreas

More information about the lustre-devel mailing list