FUSE extended attribute patches available

Jordan Hubbard jkh at ixsystems.com
Tue Mar 8 05:26:44 UTC 2016


> On Mar 6, 2016, at 11:59 PM, Robert Watson <rwatson at FreeBSD.org> wrote:
> 
> For example: who should be responsible for backing up those attributes? For ‘system’ attributes in FreeBSD, it is assumed that backup tools will be aware of the services layered over the attributes — e.g., that they will back up ACLs using the ACL API, rather than backing up the binary EAs holding the ACLs. For ‘user’ attributes, it is assumed that backup tools (e.g., tar) must explicitly preserve them, since they are user-defined and user-managed. For filesystem-specific attributes, some other choice will need to be made — perhaps filesystem-specific backup tools need to know about them?

As Rick observed, the last time this came up, I pointed out that teaching all possible “archivers” of filesystem information (which includes serializers, like rsync / scp / etc) how to cope gracefully with EAs and ACLs, even if you stick ACLs in an EA system namespace and make them opaque blobs, is “hard” and it’s the edge/legacy cases that really hose you.

This is why Apple chose to split the problem space between “things that are capable of dealing with the problem natively” (abstracting that native understanding behind the copyfile(3) APIs), which is a comparatively small number of tools, and “everything else” which gets all of its metadata serialized into an AppleDouble file.  Yes, those are the ._* files you see when you copy a bunch of files off your Mac onto a filesystem that doesn’t know how to cope with the metadata.  The extra AppleDouble files just sit around passively on that NTFS or ext2fs filesystem, minding their own business, until they get copied back to to Mac, at which point something at the VFS layer (I’m guessing now, I never actually looked) re-unites the ._Foo file with its corresponding Foo file and the AppleDouble file disappears.

I used to think this was kind of ghetto, then I observed how many problems it solved in terms of turning data-loss scenarios into “no big deal, it’ll all work out” scenarios and I changed my mind.

TL;DR summary:  This can be handled in such a way that “no one need be responsible” for backing up those attributes if you’re willing to pay the freight.

- Jordan



More information about the freebsd-scsi mailing list