~bitfehler/m2dir

1

Metadata in extended attributes?

Details
Message ID
<c7ab1f16-fe7b-4acf-b64c-7927eab2c321@app.fastmail.com>
DKIM signature
pass
Download raw message
Have you considered using extended file attributes for metadata? Extended
attributes exist exactly for this kind of use case.

With xattrs, renaming a file would move its metadata with it. A separate
metadata file cannot be moved in the same operation as the original file, so in
case of a system crash, the metadata will be orphaned and the moved item will
lose its metadata (e.g.: flags).

Handling over a file descriptor for a message from one process to another
allows the second process to read/write metadata with fgetxattr/sgetxattr,
rather than requiring an additional fd for flags.

There's a precedent of this approach in Haiku's email program, which uses
extended attributes for message metadata:
https://www.haiku-os.org/docs/userguide/en/workshop-email.html

Curious to hear your thoughts.

Cheers,

--
Hugo
Details
Message ID
<253cf90b-13b7-4bdf-8159-cfc631380e42@aasrud.com>
In-Reply-To
<c7ab1f16-fe7b-4acf-b64c-7927eab2c321@app.fastmail.com> (view parent)
DKIM signature
pass
Download raw message
> Have you considered using extended file attributes for metadata? 
> Extended
> attributes exist exactly for this kind of use case.

We discussed this previously, but ~bitfehler argued against it because of 
uncertain platform support.

https://lists.sr.ht/~bitfehler/m2dir/%3C17c32401239f7b0b.f35d3f6599202235.cdc008ecf268f5a1@mba%3E
Reply to thread Export thread (mbox)