<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
You can also see this with debugfs, using the "ls -lD <dir>" option.  This will dump the FID-in-dirent data, if present:
<div class=""><br class="">
</div>
<div class="">
<div style="margin: 0px; font-stretch: normal; font-size: 14px; line-height: normal; font-family: Monaco; color: rgba(242, 242, 242, 0.901961); background-color: rgba(0, 0, 0, 0.862745);" class="">
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">debugfs -c -R "ls -lD ROOT" /dev/loop0</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">debugfs 1.46.2.wc1 (28-Feb-2021)</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">/dev/loop0: catastrophic mode - not reading inode or group bitmaps</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  25043   40755 (2)       0      0    4096  4-Aug-2021 03:20 .</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">      2   40755 (2)       0      0    4096 27-Jul-2021 12:14 ..</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  25044   40755 (18)      0      0    4096 27-Jul-2021 12:14 fid:[0x200000002:0x1:0x0] .lustre</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    188  100644 (17)      0      0       0 27-Jul-2021 12:21 fid:[0x200000402:0x1:0x0] foo</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    189  100644 (17)      0      0       0 27-Jul-2021 12:22 fid:[0x200000402:0x2:0x0] bar</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    190  100644 (17)      0      0       0 29-Jul-2021 00:23 fid:[0x200000402:0x3:0x0] data</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">  25070   40755 (18)      0      0    4096  3-Aug-2021 13:49 fid:[0x2000013a1:0x2:0x0] pfl</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    195  100644 (17)      0      0   28128  2-Aug-2021 14:46 fid:[0x2000013a1:0x9:0x0] fsxfile</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    196  100644 (17)      0      0       0  2-Aug-2021 02:17 fid:[0x2000013a1:0xa:0x0] fsxfile.fsxgood</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    197  100644 (17)      0      0       0  2-Aug-2021 14:46 fid:[0x2000013a1:0xb:0x0] fsxfile.fsxlog</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    198  100644 (17)      0      0       0  3-Aug-2021 12:59 fid:[0x2000013a1:0xc:0x0] nolayout</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    199  100644 (17)      0      0       0  3-Aug-2021 13:00 fid:[0x2000013a1:0xe:0x0] nolayout2</span></div>
<div style="margin: 0px; font-stretch: normal; line-height: normal;" class=""><span style="font-variant-ligatures: no-common-ligatures" class="">    201  100644 (17)      0      0       0  3-Aug-2021 20:36 fid:[0x2000013a1:0x13:0x0] data.3d70119</span></div>
</div>
<div class=""><span style="font-variant-ligatures: no-common-ligatures" class=""><br class="">
</span></div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">On Aug 4, 2021, at 21:19, Siyao Lai via lustre-devel <<a href="mailto:lustre-devel@lists.lustre.org" class="">lustre-devel@lists.lustre.org</a>> wrote:</div>
<br class="Apple-interchange-newline">
<div class="">
<div class="WordSection1" style="page: WordSection1; caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
FID is packed after ext4_dir_entry.name, you can refer to osd_ldiskfs_filldir() to see how it’s unpacked.<o:p class=""></o:p></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Cheers,<o:p class=""></o:p></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
Lai<o:p class=""></o:p></div>
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
<div style="border-style: solid none none; border-top-width: 1pt; border-top-color: rgb(181, 196, 223); padding: 3pt 0cm 0cm;" class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<b class=""><span style="font-size: 12pt;" class="">From:<span class="Apple-converted-space"> </span></span></b><span style="font-size: 12pt;" class="">lustre-devel <<a href="mailto:lustre-devel-bounces@lists.lustre.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">lustre-devel-bounces@lists.lustre.org</a>>
 on behalf of Saisha Kamat via lustre-devel <<a href="mailto:lustre-devel@lists.lustre.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">lustre-devel@lists.lustre.org</a>><br class="">
<b class="">Reply-To:<span class="Apple-converted-space"> </span></b>Saisha Kamat <<a href="mailto:skamat1@uncc.edu" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">skamat1@uncc.edu</a>><br class="">
<b class="">Date:<span class="Apple-converted-space"> </span></b>Thursday, August 5, 2021 at 10:30 AM<br class="">
<b class="">To:<span class="Apple-converted-space"> </span></b>"<a href="mailto:lustre-devel@lists.lustre.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">lustre-devel@lists.lustre.org</a>" <<a href="mailto:lustre-devel@lists.lustre.org" style="color: rgb(149, 79, 114); text-decoration: underline;" class="">lustre-devel@lists.lustre.org</a>><br class="">
<b class="">Subject:<span class="Apple-converted-space"> </span></b>[lustre-devel] Locating FID-in-Dirent.<o:p class=""></o:p></span></div>
</div>
<div class="">
<div style="margin: 0cm 0cm 0.0001pt; font-size: 11pt; font-family: Calibri, sans-serif;" class="">
<o:p class=""> </o:p></div>
</div>
<div class="">
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New"; box-sizing: inherit; font-variant-ligatures: none; white-space: pre-wrap; border-top-left-radius: 4px; border-top-right-radius: 4px; border-bottom-right-radius: 4px; border-bottom-left-radius: 4px; font-variant-caps: normal; word-spacing: 0px;" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">Hi all, <o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class=""><o:p class=""> </o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">I am a Ph.D student at UNCC. I am currently trying to retrieve lustre metadata from ldiskfs. <o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class=""><o:p class=""> </o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">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.<o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class=""><o:p class=""> </o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">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).<o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class=""><o:p class=""> </o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">struct ext4_dir_entry {<o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">    __le32    inode;            /* Inode number */<o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">    __le16    rec_len;        /* Directory entry length */<o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">    __le16    name_len;        /* Name length */<o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">    char    name[EXT4_NAME_LEN];    /* File name */<o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">};  <o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class=""> <br class=""><br class=""><o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">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 Identifier.<o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class=""> <o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">Can you let us know where to locate the FID-in-Dirent information?<o:p class=""></o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class=""><o:p class=""> </o:p></span></pre>
<pre style="margin: 0cm 0cm 3pt; font-size: 10pt; font-family: "Courier New";" class=""><span style="font-size: 9pt; font-family: Monaco; color: rgb(29, 28, 29);" class="">Thanks,<br class="">Saisha Kamat<o:p class=""></o:p></span></pre>
</div>
</div>
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">_______________________________________________</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<span style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">lustre-devel
 mailing list</span><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="mailto:lustre-devel@lists.lustre.org" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">lustre-devel@lists.lustre.org</a><br style="caret-color: rgb(0, 0, 0); font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">
<a href="http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org" style="color: rgb(149, 79, 114); text-decoration: underline; font-family: Helvetica; font-size: 12px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px;" class="">http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org</a></div>
</blockquote>
</div>
<br class="">
<div class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
<div>Cheers, Andreas</div>
<div>--</div>
<div>Andreas Dilger</div>
<div>Lustre Principal Architect</div>
<div>Whamcloud</div>
<div><br class="">
</div>
<div><br class="">
</div>
<div><br class="">
</div>
</div>
</div>
</div>
</div>
</div>
<br class="Apple-interchange-newline">
</div>
<br class="Apple-interchange-newline">
<br class="Apple-interchange-newline">
</div>
<br class="">
</div>
</body>
</html>