On Wed, Feb 12, 2003 at 06:50:55PM -0800, Eric Chen wrote:
> Hello SGI XFS development team member,
hi there,
> 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
These programs were originally written by Andreas Gruenbacher
(CC'd), with relatively minor changes from us, so you may want
to discuss this in detail with him.
> 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
The code is in the "attr" package, and the XFS CVS tree below
cmd/attr/getfattr/ and cmd/attr/setfattr/.
> 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.
Andreas has a modified version of the fileutils package on his
website which preserved ACLs across cp, mv, etc. I believe he
has recently been working on extending this to EAs in general -
I have a patch from Andreas in my queue somewhere adding generic
EA copying routines into libattr; so you could contact him to
see where he's up to and where/how you can help out.
cheers.
--
Nathan
|