xfs
[Top] [All Lists]

Re: How does linux-xfs list extended attributes by namespace?

To: Craig Rodrigues <rodrigc@xxxxxxxxxxxxxx>
Subject: Re: How does linux-xfs list extended attributes by namespace?
From: Nathan Scott <nathans@xxxxxxx>
Date: Fri, 1 Apr 2005 11:23:52 +1000
Cc: linux-xfs@xxxxxxxxxxx
In-reply-to: <20050331173543.GA77406@crodrigues.org>; from rodrigc@crodrigues.org on Thu, Mar 31, 2005 at 12:35:43PM -0500
References: <20050331173543.GA77406@crodrigues.org>
Sender: linux-xfs-bounce@xxxxxxxxxxx
User-agent: Mutt/1.2.5i
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


<Prev in Thread] Current Thread [Next in Thread>