[ACL-Devel] FS meta information (properties/attributes/...)

Curtis Anderson canderson@turbolinux.com
Wed, 12 Apr 2000 14:57:33 -0700


Linda Walsh wrote:
> Andreas Gruenbacher wrote:
> > Now there again is a choice. Do we need arbitrary length attributes?
> >
> > If so, the interface would need to be file-like, with several levels of
> > indirection etc. (the full overheads). Otherwise, the data of one attribute can
> > be passed to/from the kernel in a fixed-size buffer. I'd prefer the latter,
> > again for efficiency reasons. Any other opinions?
> >
> > Also, a fixed upper limit (say, 256K) would allow a simple allocation scheme on
> > the filesystem (one level of indirection should do). Does anybody know if/how
> > the existing code can be reused?
> >
> > I guess Linda said Irix would support arbitrary length attributes. At least in
> > the man page referenced above, it says the limit is 256K. Was that limit lifted
> > recently?
> ---
>         Nope -- I mis-spoke.  If you are going to have variable size attr's, why
> have a limit.  The format could support chaining -- I don't know the design
> decision behind the IRIX 256K limit.

I've been watching for a few months now, but never had much of anything to
contribute.  I implemented the directory and attribute support in XFS while
I was at SGI, so there's finally something useful I can add to the group.

There are two basic approaches to adding extended attributes to the UNIX
filesystem namespace.  In one model, every file becomes a directory-like
thing with named "forks" and you use read()/write()/open()/close()/creat()
to access those "forks".  In the other model, we attach name/value pairs to
the inode in some implementation dependent way and we use something like
attr_get("attrname", char *valuebufptr, int valuebufsize) to access them.

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.  :-)

The XFS design allows the value of an attribute to be any size from 0B to
256KB.  The key is that in order to access that value, you have to get/put
the whole value at once.  Since you can attach an unlimited number of
attributes to any given filesystem object, the 256KB limit seemed fine to me.

Thanks,

	Curtis

-- 
Curtis Anderson - Storage Group Leader		canderson@turbolinux.com
-------------------------------------------------------------------------
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.
-------------------------------------------------------------------------