[GSoC 2026] erofs-rs xattr POC + xattr_size() fix

Priyansh Saxena
2026-03-31T13:31:16Z

[-- Attachment #1: Type: text/plain, Size: 970 bytes --]

Hi,

I’m Priyansh, a student at IIITM Gwalior. I am applying for the erofs-rs
GSoC project. I have been reading the code for a few weeks.

I found a small issue in types.rs in the function xattr_size().

(count - 1) * size_of::<XattrEntry>() + size_of::<XattrHeader>()

when count = 1, it returns only 12, which is just the header size but
there is also one inline entry after the header, and it is not
counted.

In line 115 on filesystem.rs, this value is used to find where the inline
file data starts. Because of this any FlatInline inode with exactly one
xattr gives wrong file data. There is no error or panic, but the output is
wrong.

While working on this, I also built a working inline xattr parser on a real
test image:
https://github.com/priyansh-saxena1/erofs-rs/tree/xattr-poc

I will send a patch soon to fix xattr_size().

I have also submitted my GSoC proposal.

Thanks,
Priyansh Saxena
https://github.com/priyansh-saxena1

[-- Attachment #2: Type: text/html, Size: 2859 bytes --]