xfs
[Top] [All Lists]

Re: [RFC][PATCH] VFS interface for extended attributes

To: Nathan Scott <nathans@xxxxxxx>
Subject: Re: [RFC][PATCH] VFS interface for extended attributes
From: Daniel Phillips <phillips@xxxxxxxxxxxxxx>
Date: Mon, 3 Dec 2001 15:52:58 +0100
Cc: Alexander Viro <viro@xxxxxxxxxxxx>, Andi Kleen <ak@xxxxxxx>, Andreas Gruenbacher <ag@xxxxxxxxxxx>, Linus Torvalds <torvalds@xxxxxxxxxxxxx>, linux-kernel@xxxxxxxxxxxxxxx, linux-fsdevel@xxxxxxxxxxxxxxx, linux-xfs@xxxxxxxxxxx
In-reply-to: <20011203115400.F39338@wobbly.melbourne.sgi.com>
References: <Pine.LNX.4.21.0111121152410.14344-100000@moses.parsec.at> <E16Agdh-0000BS-00@starship.berlin> <20011203115400.F39338@wobbly.melbourne.sgi.com>
Sender: owner-linux-xfs@xxxxxxxxxxx
On December 3, 2001 01:54 am, Nathan Scott wrote:
> ...BTW, we have reworked the interfaces once more and
> will send out the latest revision in the next couple of days -
> it does away with commands and flags completely, except for this
> one instance of flags in the set operation...

OK, well I can see some patterns emerging already:

long sys_getxattr(char *path, char *name, void *value, size_t size, int flags)
long sys_setxattr(char *path, char *name, void *value, size_t size, int flags)
long sys_listxattr(char *path, char *name, void *value, size_t size, int flags)

long sys_fgetxattr(int fd, char *name, void *value, size_t size, int flags)
long sys_fsetxattr(int fd, char *name, void *value, size_t size, int flags)
long sys_flistxattr(int fd, char *name, void *value, size_t size, int flags)

Why don't I see 'delxattr'?

Why is there a need for separate 'path' and 'fd' variants?

<nit>Is there any other kind of 'attr' in the syscall interface?  Why not spell
it 'attr' instead of 'xaddr'?  How about geta, seta, dela, lista?</nit>

The idea of attribute class (namespace) isn't explicitly accomodated.  I presume
the intention is to encode the class as part of the attribute name and have the 
filesystem or vfs parse it out.  Is that such a good idea?  Why not pass the 
class explicitly and worry about the namespace parsing in user space?

As far as listing attributes goes, is there ever a reason to list system and
user attributes at the same time?  IOW, the listxattr call needs a class
parameter too.  It doesn't name a 'name', at least if you accept my argument
that the class should not be parsed inside the kernel.  There's no particular
reason to force all the parameter lists to be the same is there?

--
Daniel


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