Re: [lustre-devel] Inquiry Regarding Checksum Support for Lustre Extended Attributes

Andreas Dilger via lustre-devel <[email protected]> Wed, 12 Jun 2024 22:27:36 +0000
Newsgroups org.lustre.lists.lustre-devel
Message-ID <[email protected]>
On Jun 12, 2024, at 12:35, Saisha Kamat via lustre-devel <[email protected]<mailto:[email protected]>> wrote:

Hello,

I hope this email finds you well.

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.

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.

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.

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.

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.

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.

Cheers, Andreas

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.

Thank you very much for your time and assistance.

Thanks and Regards,
Saisha
_______________________________________________
lustre-devel mailing list
[email protected]<mailto:[email protected]>
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org

Cheers, Andreas
--
Andreas Dilger
Lustre Principal Architect
Whamcloud

_______________________________________________
lustre-devel mailing list
[email protected]
http://lists.lustre.org/listinfo.cgi/lustre-devel-lustre.org