<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<style type="text/css" style="display:none;"> P {margin-top:0;margin-bottom:0;} </style>
</head>
<body dir="ltr">
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Andreas,</div>
<div style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
A few clarifying questions, partly for me and hopefully for Saisha as well as a non-Lustre expert.  The ldiskfs file system supported for Lustre disk targets is a modified ext4, so it inherits ext4 features for the local volume, but not all of them are supported
 for ldiskfs formatted volumes.  So does Lustre support use of metadata_csum (that's the relevant option, isn't it?) when formatting ldiskfs?  Is it on by default?</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Inferring from your comments, I think you're saying metadata_csums are (or can be) used on an ldiskfs volume.  But since they are just a local disk feature, they contribute only minimally to resiliency in Lustre, and Lustre makes no use of them.  They can help
 protect against some damage to the local volume, but Lustre is unaware of them.<br>
<br>
Do the metadata checksums extend to all ext4/ldiskfs extended attributes?  Are they done separately for individual xattrs or just for the whole inode?  The kernel wiki describes a possible implementation that credits someone named 'Andreas Dilger' ( :) ) with
 suggesting checksumming them under the inode checksum rather than separately, but I don't know what was actually implemented.</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
<br>
Regards,</div>
<div class="elementToProof" style="font-family: Aptos, Aptos_EmbeddedFont, Aptos_MSFontService, Calibri, Helvetica, sans-serif; font-size: 12pt; color: rgb(0, 0, 0);">
Patrick</div>
<div id="appendonsend"></div>
<hr style="display:inline-block;width:98%" tabindex="-1">
<div id="divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" style="font-size:11pt" color="#000000"><b>From:</b> lustre-devel <lustre-devel-bounces@lists.lustre.org> on behalf of Andreas Dilger via lustre-devel <lustre-devel@lists.lustre.org><br>
<b>Sent:</b> Wednesday, June 12, 2024 5:27 PM<br>
<b>To:</b> Saisha Kamat <skamat1@charlotte.edu><br>
<b>Cc:</b> lustre-devel <lustre-devel@lists.lustre.org><br>
<b>Subject:</b> [External] : Re: [lustre-devel] Inquiry Regarding Checksum Support for Lustre Extended Attributes</font>
<div> </div>
</div>
<div class="" style="word-wrap:break-word; line-break:after-white-space">On Jun 12, 2024, at 12:35, 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=""><br class="x_Apple-interchange-newline">
<div class="">
<div dir="ltr" class="">Hello,<br class="">
<br class="">
I hope this email finds you well.<br class="">
<br class="">
My name is Saisha, and I am currently pursuing my Ph.D. at UNC-Charlotte, with a focus on research related to the Lustre File System. As part of my project, I am exploring the possibility of utilizing checksums to verify Lustre extended attributes.<br class="">
<br class="">
My understanding is that the ext4 file system supports checksums for extended attributes (xattrs). However, I am interested in whether this functionality extends to Lustre as well.<br class="">
</div>
</div>
</blockquote>
<div><br class="">
</div>
Yes, the ext4 (and ZFS) xattr values have checksums.  No, the xattr checksums are neither managed or verified by Lustre, and only come into effect when they are passed on to the backing filesystem.  Conceivably, it would be possible to have a checksum (e.g.
 crc32c) for the xattr values in the MDS_GETXATTR and MDS_SETXATTR RPCs, if this is something you are interested to contribute.</div>
<div><br class="">
</div>
<div>This could probably be done by overloading one of the 32-bit fields in the mdt_body for getxattr, and one in mdt_rec_reint for setxattr, but there is also "opportunistic" xattr prefetching done in the lookup RPC, so that would need to be covered as well.</div>
<div><br class="">
</div>
<div>Also, the checksum would also need to be kept with the xattrs in cache and verified on access, otherwise they could become corrupted in memory after the RPC processing had completed.</div>
<div><br class="">
</div>
<div>Finally, there is no interface to specify or verify the xattr checksum in the syscall interface, so there can be no guarantee that the data supplied in the setxattr is correct, or remains correct after supplied to getxattr, but the window there is very
 small.</div>
<div><br class="">
</div>
<div>Cheers, Andreas</div>
<div><br class="">
<blockquote type="cite" class="">
<div class="">
<div dir="ltr" class="">I would greatly appreciate it if you could provide some insights or direct me to relevant documentation on this matter. Any information or guidance you can offer would be invaluable to my research.<br class="">
<br class="">
Thank you very much for your time and assistance.
<div class=""><br class="">
</div>
<div class="">Thanks and Regards,</div>
<div class="">Saisha</div>
</div>
_______________________________________________<br class="">
lustre-devel mailing list<br class="">
<a href="mailto:lustre-devel@lists.lustre.org" class="">lustre-devel@lists.lustre.org</a><br class="">
<a href="https://urldefense.com/v3/__http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org__;!!ACWV5N9M2RV99hQ!NxZsGb9nGU3ZLJa1pn9PclSTh2QUuTOnSdBLFvT4cYZxHl-jq2z3TrARWnu9vlkaS-diipwr7e73a1J0pgTw4Htt05quzd0a$">http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org</a><br class="">
</div>
</blockquote>
</div>
<br class="">
<div class="">
<div dir="auto" class="" style="color:rgb(0,0,0); letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; word-wrap:break-word; line-break:after-white-space">
<div dir="auto" class="" style="color:rgb(0,0,0); letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; word-wrap:break-word; line-break:after-white-space">
<div dir="auto" class="" style="color:rgb(0,0,0); letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; word-wrap:break-word; line-break:after-white-space">
<div dir="auto" class="" style="color:rgb(0,0,0); letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; word-wrap:break-word; line-break:after-white-space">
<div dir="auto" class="" style="color:rgb(0,0,0); letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; word-wrap:break-word; line-break:after-white-space">
<div dir="auto" class="" style="color:rgb(0,0,0); letter-spacing:normal; text-align:start; text-indent:0px; text-transform:none; white-space:normal; word-spacing:0px; text-decoration:none; word-wrap:break-word; line-break:after-white-space">
<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="x_Apple-interchange-newline">
</div>
<br class="x_Apple-interchange-newline">
<br class="x_Apple-interchange-newline">
</div>
<br class="">
</div>
</body>
</html>