top | item 44337987

(no title)

sockboy | 8 months ago

Emulating extended attributes for a filesystem is a fascinating approach. It can significantly streamline lightweight OS customization without needing a full port of the filesystem driver. Has anyone experimented with this in open-source projects? Would love to hear about practical results or challenges.

discuss

order

wmf|8 months ago

Linux has supported xattrs for many years; there's no need to emulate them.

jdboyd|8 months ago

Linux's xattrs appear to only be an array of bytes, while Haiku's extended attributes are typed (string, mime, int, llong, float, double, bool, icon, or raw). This means a compatibility layer is probably needed to handle encoding types into the value of the xattr. Xattr(7) says there is a limit of 64kb for the value. Some haiku programs allegedly use more, but i dont have an example handy. Further, specific file systems may impose additional restrictions. For instance ext4 requires all xattrs to fit in a single file system block (assuming that the man page I'm reading is not out of date).