[lustre-devel] Locating FID-in-Dirent.

Saisha Kamat skamat1 at uncc.edu
Wed Aug 4 09:46:19 PDT 2021

Hi all,

I am a Ph.D student at UNCC. I am currently trying to retrieve lustre
metadata from ldiskfs.

The Lustre Document for LFSCK Phase 1.5 suggests that there is a
FID-in-Dirent (File Identifier for each sub-directories and child
files) stored in the Directory Entry of the Parent Directory. But we
could not find such FID while reading the directory entry of ldiskfs.

We use the following data struct ext4_dir_entry{} to access the
directory entry information (after checking the ldiskfs patches, we do
not notice any change to this data structure in ldiskfs).

struct ext4_dir_entry {
    __le32    inode;            /* Inode number */
    __le16    rec_len;        /* Directory entry length */
    __le16    name_len;        /* Name length */
    char    name[EXT4_NAME_LEN];    /* File name */

Applying it to a ldiskfs image, we are able to read each directory
entry's inode number and name correctly. But, we can not find its File

Can you let us know where to locate the FID-in-Dirent information?

Saisha Kamat
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20210804/9add63b6/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: inode.png
Type: image/png
Size: 122472 bytes
Desc: not available
URL: <http://lists.lustre.org/pipermail/lustre-devel-lustre.org/attachments/20210804/9add63b6/attachment-0001.png>

More information about the lustre-devel mailing list