On Tue, Oct 24, 2000 at 12:21:04PM +0100, Stephen C. Tweedie wrote:
> Hi,
>
> On Sun, Oct 22, 2000 at 04:23:53PM +0200, Andreas Gruenbacher wrote:
> >
> > This is a proposal to add extended attributes to the Linux kernel.
> > Extended attributes are name/value pairs associated with inodes.
>
> Our proposed kernel API looks something like this:
>
> sys_setattr (char *filename, int attrib_family, int op,
> struct attrib *old_attribs, int *old_lenp,
> struct attrib *new_attribs, int new_len);
>
> sys_fsetattr(int fd, int attrib_family, int op,
> struct attrib *old_attribs, int *old_lenp,
> struct attrib *new_attribs, int new_len);
>
> where <op> can be
>
> ATR_SET overwrite existing attribute
> ATR_GET read existing attribute
> ATR_GETALL read entire ordered attribute list (ignores new val)
> ATR_PREPEND add new attribute to start of ordered list
> ATR_APPEND add new attribute to end of ordered list
> ATR_REPLACE replace entire ordered attribute list
>
> and where <attribs> is a buffer of length <len> bytes of variable
> length struct attrib records:
This API looks sane and I like it even more then Andreas one.
But I think the whole family thing is too specific.
IMHO the EA stuff should be mostly used as backing-store for other APIs.
Shure there should be lowlevel access to the eas for user-EAs or some
special cases, but for the main usages (ACLs, Filesystem Capabilities,
MACs) there should be a special high-level API instead.
So instead of using the EA-API for your ACL lib und progs, you use ACL
syscalls instead. Theses map to EAs as specified in the ACL kernel module.
Many Linux-Supported Filesystems have support for this General-EAs:
ext2 (with Andreas patches), xfs, ntfs.
If we think of an imaginary filesystem that supports e.g. only posix
ACLs, it would export fake-EA methods that work only when the EA is
'$posix-acl' and map them to their native representation.
The main reson behind this is a clean separation between low-level EA api
and it's high-level users.
>
> The extended attribute patch currently on the acl-devel group simply
> doesn't give us the ability to do extended attributes on any
> filesystem other than ext2, because it has such specific semantics.
If I look at the ea patch it is very promising and gives a really good
abstraction for name/value EAs. But the ACL implementation is not generic
enough, IMHO.
Christoph
--
Always remember that you are unique. Just like everyone else.
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]