Hello SGI XFS development team member,
I wanted to be able to integrate file copying with preserving extended
attributes when copying to/from an XFS filesystem. I looked up different
resources and tried out copying over the network in different ways, such as
rcp, rsync, scp, smbfs, nfs. However, none of them support extended
attributes, and extended attributes are lost when the file is copied over to
the destination.
I came across 'getfattr' and 'setfattr' and those 2 commands seem to
preserve the EA if I first
'getfattr -Rd * > save_attr'
then copy the files over
then 'setfattr --restore=save_attr'
This *seems* to work fine, but since you were listed as the author in the
man pages, I thought you might know more about this. Ideally, I want to
integrate file copying and preserving extended attributes, so I am
attempting to modify the source code so that will be handled. I was hoping
you could give me some more information, such as where I can find the code
for 'getfattr' and 'setfattr' so I could take a look at it and get some idea
from that. I'm not really sure where to get started, so if you have any
suggestions or references to resources that might help me on my way, I would
be very grateful.
Thanks,
Eric
|