>From yyyyy@xxxxxxxxxxxx Mon Feb 26 19:46:18 2001
>> >Fine, so those are properties of the filing system. The right place to=
> put
>> >them is in the inode - of course, you'd need extra functionality *or* =
>extra
>> >fields somewhere like "struct stat".
>>=20
>> If there was an istat() that can stat a specific inode and there is a=20
>> st_ishadow (shadow inode) field in the main stat data you could hold su=
>ch
>> data inside a shadow inode.
>If you are going to associate arbitrary extended attributes with
>a file, do it right and implement a set of new system calls. A simple
>call to set and retrieve name-value pairs associated with an inode
>would be sufficient. =20
This is about what I had in mind:
- Some way to find out whether there are additional file attributes
This could be e.g. attrstat()/lattrstat()/fattrstat()
It should list the number of attributes as well as the number
of bytes needed to hold all of them (to make tar easier to implent)
- If there is a way to read all attributes in one call in a format
that is used by the tar exteneded attribute "file", it would even
be fast to implement for a backup system.
- sufficient would be something like "read next attr" and write
attr.
>Of course NFS, AFS, pax, cpio, tar, et. al. would require modifications
>to preserve these attributes.=20
If the low level implementation uses shadow inodes, then NFS might work
with little effort. Adding the calls above to the NFS rpc calls seems to
be better.
As the new ustar format already supports name-value pairs, this looks
as if it would be the best idea to fit smoothly into the existing
POSIX framework.
>Not all filesystem types need support such an API, of course,=20
>ENOSYS would be a legal return value.
For somebody like me who writes portable software even anything that
can be detected by 'autoconf' is OK.
Jörg
EMail:yyyyy@xxxxxxxxxxxxxxxxxxxxxxxxxxx (home) Jörg Schilling D-13353 Berlin
yy@xxxxxxxxxxxxxxx (uni) If you don't have iso-8859-1
yyyyyyyyy@xxxxxxxxxxxx (work) chars I am J"org Schilling
URL: http://www.fokus.gmd.de/usr/schilling ftp://ftp.fokus.gmd.de/pub/unix
|