[Lustre-devel] Caching the root directory

Ken Hornstein kenh at cmf.nrl.navy.mil
Mon Aug 16 08:13:32 PDT 2010

>Well, there is a simple rule for a root of the fs. The rule says
>the parent of the root inode is the root inode.

Hm, I had just tried that, but it didn't seem to work; I'll have to see
what's going on there.

>Besides, when you do getattr by fid (which you do from ll_inode_revalidate),
>you don't have parent anyway, so you onl supply child inode information.

Well, if you just call md_getattr(), yes, you can do that with just the
FID in question; that works fine, and I do that now.  But if you want
to get a lock so you can cache the attributes using md_intent_lock(),
then you DEFINITELY need the parent fid; I learned the hard way that if
you don't include it then the server will throw an LBUG().  This is
presuming you ignore the server's indication of the lack of support for
CONNECT_ATTRFID (see previous thread, but the short deal is that it
was disabled somewhere between 1.8 and 2.0).


More information about the lustre-devel mailing list