On 31.03.2019 23:08, ttco...@netcourrier.com wrote:
Correction: "Mail" is probably a quite bad example, as it relies
heavily on extended attributes. There are probably many candidates all
over the difficulty spectrum (from easy to hard) that would make more
sense to port. Unless someone came up with a hack to wrap xattr's into
something else, ouch.
Cedric
xattrs? So, Haiku uses Linux terminology? OS/2 calls them "EA's". What
are extended attributes needed for in Mail
applications? Indexing? Storing keywords? OS/2 mostly uses EA's to store
object properties for desktop objects, and
also to emulate POSIX file attributes. And also icons, keywords for
search, tokenized images (i.e., bytecode) for scripts written in REXX
language etc. In OS/2, EA's are limited in size to at least, 64 KB. With
JFS, they theoretically could be larger, but for compatibility with
older HPFS file system, the limit is set to 64 KB. IIRC, in ext2fs, max.
extended attribute size is only 4 KB, which could be too little for some
purposes. In Sculpt, ext2 is used as current file system, so, its
limits apply. (this is for Linux ext2 driver, not sure about a NetBSD
driver in rump kernel). On other file sysytems, EA support may be
missing, but it can be emulated. For example, on FAT, OS/2 uses a file
called "ea data. sf" in the root directory, which contains EA's of all
files on the partition in special format. All file metainfo is accessed
from a directory entry (on FAT), or its inode on most other file
systems. So, on FAT, a directory entry contains a 16-bit handle to an EA
stored in "ea data. sf" file. Though, in FAT32 direntry, the two bytes
used to reference a EA, are reused for high word of first cluster number
of the file. So, for implementation of EA's in FAT32, two bits of
another reserved byte of a direntry is reused. (one bit means "this file
has EA's", another means "the EA's are critical", i.e., they are
mandatory to be existed when opening the file). So, EA's on FAT32 are
laying around near the file itself, in the same directory, in a hidden
file. The disadvantage is that EA files are laying around everywhere,
like a trash. So, if a file system doesn't support EA's, they can be
emulated like this.
If I correctly understood, there is no EA/xattr support in Genode VFS,
so far. But for my project (which is "OS/2 personality" on top of
Genode), I plan to make a server (like Genode's VFS server) supporting
OS/2-like IFS (Installable File Systems), like plugins. They, of course,
support EA's. But then only OS/2 applications will be able to take
advantage of using EA's. Serving OS/2 file systems to Genode
applications is planned too. You can go similar way.
_______________________________________________
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users
_______________________________________________
Genode users mailing list
users@lists.genode.org
https://lists.genode.org/listinfo/users