[ACL-Devel] FS meta information (properties/attributes/...)
Andreas Gruenbacher
a.gruenbacher@bestbits.at
Thu, 13 Apr 2000 02:19:59 +0200
Curtis Anderson wrote:
> [...]
> IMHO, the directory-like approach is a slippery slope leading to not having
> extended attributes at all. As soon as you go that route, people want access
> to the timestamps on each "fork", they want separate permisions on each "fork",
> and they want attribute values greater than 4GB. They should just have coded
> their app to use real directories instead of trying to hide it all under the
> name of "attributes", IMHO. :-)
Thanks Curtis,
that makes sense. Forks would be not much different from directories hidden
behind files. From a performance point of view, I think that's just too much
overhead for things like ACLs, which need to be retrieved very quickly.
On ext2, we could try something like the following:
A chained list of blocks (usually just one block) containing something like the
following struct for each attribute:
struct attr_entry {
__u16 attr_type; // user or system attribute?
__u16 name_offs;
__u32 value_block; // disk block attribute is stored on
__u32 value_size; // size of attribute value
__u16 value_offs; // offset in disk block
};
And then somewhere the attribute names:
"acl\0dacl\0cap\0\0" // system attribute names
"thumbnail\0\0" // user attribute names
Then depending on size, block either points to a direct block, or an indirection
block. With 1K blocks this gives us 256K per attribute. With 4K blocks we could
get 4M. Not bad :-)
I guess storing the attribute entries consecutively (with the names padded to
word boundaries) should do.
Compared to the current approach, we would have one more level of indirection in
a simple implementation. Maybe that can be improved upon by storing everything
on the first block if there's enough room (which I expect to be the common
case).
Curtis,
is there any much superior approach that I'm not aware of?
Thanks,
Andreas
------------------------------------------------------------------------
Andreas Gruenbacher, a.gruenbacher@computer.org
Contact information: http://www.bestbits.at/~ag/
-------------------------------------------------------------------------
Linux ACL Developers List --- http://acl.bestbits.at/acl-devel/
To unsubscribe, send a message with `unsubscribe acl-devel'
in the message body to majordomo@bestbits.at.
-------------------------------------------------------------------------