On Thu, Mar 31, 2005 at 12:35:43PM -0500, Craig Rodrigues wrote:
> Hi,
Hi there,
> I am helping with the port of XFS to FreeBSD, based on
> the Linux-XFS codebase.
Heh, you guys must have alot working if you're looking at EAs?
> Can someone explain to me how listing of extended attributes works?
>
> If I understand things correctly, on Linux, the call path is:
>
> linvfs_listxattr()
> -> attr_generic_list()
> -> XVOP_ATTR_LIST() (which is xfs_attr_list() )
> -> attr_system_list()
> -> attr_generic_listadd()
>
> My question is, how does the existing system call
> list extended attributes by attribute namespace?
The listxattr interface is extremely simple - it doesn't
distinguish namespaces, all atttributes are passed out in
one go (the names are all namespace-prefixed of course).
> XVOP_ATTR_LIST() doesn't take in any parameters which would
> indicate that it could list attributes in a specific attribute namespace.
The flags parameter there can be used to specify a namespace.
The by-handle interfaces are much closer to the IRIX interfaces,
and these allow listing for specific namespaces. Might help to
look at that code (below linvfs_ioctl somewhere).
> Does it list all the EA for a file?
Right, listxattr(2) does do that, its _real_ simple, as I said.
I'd be a bit surprised if the BSD interfaces are the same here -
do you have pointers to code/documentation describing the BSD
interfaces?
cheers.
--
Nathan
|