Hi,

I'm new to this area so please excuse some naive questions.
I have no criticisms, just desire clarifications on your
"Families" API for EA.

I've been looking at your API versus the XFS attrib functionality.

1.
It seems that your EA API assumes EA lists, whereas
in XFS we seem to base it on EA sets.
That is, in your API the ordering of attributes is significant;
hence the ATR_APPEND, ATR_PREPEND and an ATR_SET definition which
mentions the handling of multiple instances of the same name.
In XFS there doesn't seem to be an explicit concept of ordering,
and I thought that only one attribute name could exist for 
a particular file system object (well actually 2 - possibly
a User space version and a Root space version) -
is this not the case, Curtis ?

2.
In your definitions, you mention how only "name" in <new> is 
used for GET, and in SET you mention, 
"if multiple instances of the name already exist". 
I assume that your reference to name existence really means
matching on <name, attrib_family, name_family> ?

3.
How do you remove an attribute or multiple attributes ?
Do you do a SET with a null value in <new> ?


Thanks muchly,
Tim.


Stephen wrote:
=====================================================================
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:

      struct attrib {
              int     rec_len;                /* Length of the whole record:
                                                 should be padded to long
                                                 alignment */
              int     name_family;            /* Which namespace is the name in? */
              int     name_len;
              int     val_len;
              char    name[variable];         /* byte-aligned */
              char    val[variable];          /* byte-aligned */
      };

      ATR_SET will overwrite an existing attribute, or if the attribute does
      not already exist, will append the new attribute (ie. it does not
      override existing ACL controls, in keeping with the Principle of Least
      Surprise).  If multiple instances of the name already exist, then the
      first one is replaced and subsequent ones deleted.  If supplied with
      an "old" buffer, all old attributes of that name will be returned.

      For the PREPEND/APPEND/REPLACE operations, the entire old attribute
      set is returned.

      For GET, the <new> specification is read and all attributes which
      match any items in <new> are returned, in the order in which they are
      specified in <new>.  The actual value in <new> is ignored; only the
      name is used.

      For GETALL, <new> is ignored entirely.

      *old_lenp should contain the size of the old attributes buffer on
      entry.  It will contain the number of valid bytes in the old buffer on
      exit.  If the buffer is not sufficiently large to contain all of the
      attributes, E2BIG is returned.
=====================================================================
-
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to [EMAIL PROTECTED]

Reply via email to