Extended attributes over NFSv3

Greg Banks gnb at melbourne.sgi.com
Wed Jul 23 18:07:46 EDT 2008


Christoph Hellwig wrote:
> On Wed, Jul 23, 2008 at 10:46:40AM -0400, Jean-Francois Bouchard wrote:
>   
>> Hello,
>>
>> Our backup system rely on extended attributes (ex :
>>
>> getfattr -d tzdata-2007h-1.el4.noarch.rpm
>> # file: tzdata-2007h-1.el4.noarch.rpm
>> user.content_hash="1,1191668578.0000,458656,F1D72D65122D89C0009625C6414F6BFC")
>>
>> to work. I would like to know how they are handled in NFSv4 ? (at my
>> knowledge, in NFSv3, there is no support)
>>     
>
> SGI has a side band protocol for extended attributes over NFSv3 and even
> released sample code a few years ago. 
http://oss.sgi.com/projects/ob1.nuked/src/nfs/kern/

This is a little better than just sample code.  It's the actual Irix
client and server side implementation of the xattr protocol released
under the GPLv2.
>  If someone cares enough this
> would be about two man month to implement it.
>   
The easy bit is implementing the xattr protocol itself.  It has 4
procedures whose purpose and semantics are really quite obvious:

#define XATTRPROC1_GETXATTR	((u_long) 1)
#define XATTRPROC1_SETXATTR	((u_long) 2)
#define XATTRPROC1_RMXATTR	((u_long) 3)
#define XATTRPROC1_LISTXATTR	((u_long) 4)

using RPC program number 391063.  I think that Linux support for this
protocol would be a useful feature.

The difficult bit is working out how to handle the interaction between
POSIX ACLs and xattrs.  The only other working instance of this protocol
(client or server) would be an Irix machine, and Irix machines store
ACLs using a binary representation in a specific xattr.  So you have to
make some policy decisions like

a) do we aim for POSIX ACL interop between Linux and Irix machines?

b) when sending POSIX ACLs between Linux machines do we use the Sun ACL
protocol or the SGI xattr protocol in preference?

-- 
Greg Banks, P.Engineer, SGI Australian Software Group.
The cake is *not* a lie.
I don't speak for SGI.



More information about the NFSv4 mailing list