Re:Cosmoe: BeOS Class Library on Top of Wayland
by sockboy on Saturday June 21, 2025 @10:44AM
(#44337987)
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.
[ Parent
| on HN ]
Re:Cosmoe: BeOS Class Library on Top of Wayland
by wmf on Saturday June 21, 2025 @12:37PM
(#44338851)
Linux has supported xattrs for many years; there's no need to emulate them.
Re:Cosmoe: BeOS Class Library on Top of Wayland
by jdboyd on Saturday June 21, 2025 @02:35PM
(#44339706)
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).
Re:Cosmoe: BeOS Class Library on Top of Wayland
by jonhohle on Saturday June 21, 2025 @04:37PM
(#44340564)
For compressed files, HFS+ puts the entire contents in an (xattr né resource fork).
Re:Cosmoe: BeOS Class Library on Top of Wayland
by yencabulator on Monday June 23, 2025 @02:30PM
(#44358623)
macOS resource forks values are "file-like" with position-based "block" read/write, Linux xattrs is a key-value map with atomic get/set operations on the whole value only.