<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
</head>
<body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">
On May 1, 2021, at 16:25, Saisha Kamat via lustre-devel <<a href="mailto:lustre-devel@lists.lustre.org" class="">lustre-devel@lists.lustre.org</a>> wrote:<br class="">
<div>
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class=""><span id="gmail-docs-internal-guid-f49b40a4-7fff-1bb1-77c1-e72fb3e8dcc7" class="">
<div style="line-height: 1.656; margin-top: 0pt; margin-bottom: 0pt;" class=""><br class="">
</div>
<div style="line-height: 1.656; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;" class="">I
 am a Ph.D student at UNCC and our team is working on the Lustre filesystem. I am reading extended attributes of the ldiskfs for every inode. I have used this source
</span><a href="https://wiki.lustre.org/PFL2_High_Level_Design" style="text-decoration-line:none" class=""><span style="font-size:11pt;font-family:Arial;background-color:transparent;font-variant-numeric:normal;font-variant-east-asian:normal;text-decoration-line:underline;vertical-align:baseline;white-space:pre-wrap" class="">https://wiki.lustre.org/PFL2_High_Level_Design</span></a><span style="font-size: 11pt; font-family: Arial; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;" class="">
 to interpret the layout in which the extended attributes are stored. </span></div>
<div style="line-height: 1.656; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;" class=""><br class="">
</span></div>
<div style="line-height: 1.656; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;" class="">For
 the Lustre image we are using, there are 605 inodes out of which 253 have extended attributes. The count of lma is also 253, which is correct. However the only 22 inodes seem to have linkEA attributes and 2 inodes have lovEA attributes. The count for linkEA
 and lovEA is seems to be really small compared to the count for lma.</span></div>
<div style="line-height: 1.656; margin-top: 0pt; margin-bottom: 0pt;" class=""><span style="font-size: 11pt; font-family: Arial; background-color: transparent; font-variant-numeric: normal; font-variant-east-asian: normal; vertical-align: baseline; white-space: pre-wrap;" class="">I
 am wondering if there is an updated document on the layout of extended attributes for the ldiskfs inodes.</span></div>
</span></div>
</div>
</blockquote>
<br class="">
</div>
<div>link EA and lov EA are only added to "real" files visible in the filesystem namespace (under "ROOT/" in the MDT), while lma may also be added to internal files in order to be able to recover them if the directory structure gets corrupted.  The link EA
 is on both files and directories, while lov EA is typically only on regular files (though it can appear on directories as a "template" for how to create files within that directory).  In this case, it just sounds like your MDT is mostly empty, and only has
 a handful of files in it.  It may also be possible that the regular files are created with "mknod(S_IFREG)" or "open(O_CREAT|O_LOV_DELAY_CREATE)" which will not trigger the creation of a layout (lov EA) on the file.</div>
<div><br class="">
</div>
<div>You could probably just format a new test filesystem ("cd lustre/tests; sh llmount.sh" will use temporary files in /tmp for testing purposes, or as described in lustre/tests/cfg/local.sh or other config file as referenced by "$NAME" in the environment),
 then run your scan on the "empty" MDT image, and then create a few files in the client mountpoint to see how this is working.</div>
<div><br class="">
</div>
<div>Note that instead of interpreting the on-disk layout format yourself (which grows increasingly complex with newer features like PFL, FLR, DoM, etc.) you could use llapi_layout_get_by_xattr(), which can take an xattr read from disk and convert it to a common
 in-memory format that the llapi_layout_*() functions can process.</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>Cheers, Andreas</div>
<div>--</div>
<div>Andreas Dilger</div>
<div>Principal Lustre 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">
<br class="Apple-interchange-newline">
</div>
<br class="">
</body>
</html>