Does ZFS support extended attributes? By "extended attributes" I mean the association of an arbitrary number of name/value pairs with any file system object. Searching the source for "xattr" turns up a lot of hits, but it seems like that term doesn''t mean what I expect it to mean in the context of ZFS. If it is supported, what''s the API? Is it the getxattr/setxattr/listxattr family a la Linux? Or does ZFS provide the fsattr(5) style of a separate "attributes file" from Solaris 9? Or none of the above? Also, what''s the performance like for, say, files with many small attributes or a few large attributes, or a mix? What are the limits on attr sizes? Etc. etc. Please point me in the right direction so I can read all about it :) This message posted from opensolaris.org
John Siracusa <siracusa at mindspring.com> wrote:> Does ZFS support extended attributes? By "extended attributes" I mean the association of an arbitrary number of name/value pairs with any file system object. Searching the source for "xattr" turns up a lot of hits, but it seems like that term doesn''t mean what I expect it to mean in the context of ZFS. > > If it is supported, what''s the API? Is it the getxattr/setxattr/listxattr family a la Linux? Or does ZFS provide the fsattr(5) style of a separate "attributes file" from Solaris 9? Or none of the above? Also, what''s the performance like for, say, files with many small attributes or a few large attributes, or a mix? What are the limits on attr sizes? Etc. etc. Please point me in the right direction so I can read all about it :)What Linux allows you to do is a small subset from that Sun allows you to do with extended attribute files. Ths bad thing is that nobody seems to use extended attribute files and nobody did write up definitions on how extended attribute files should be used in order to implement the limited Linux features. It could be done by adding a extended attribute file "system" & another "user" with name value pairs similar to what POSIX.1-2001 extended tar attributes do or it could be implemented in using the "name" as file name and the "value" as file content. I am looking for such adefinition for a while as I like to make star able to transport this kind of indoemation in an OS independent way. J?rg -- EMail:joerg at schily.isdn.cs.tu-berlin.de (home) J?rg Schilling D-13353 Berlin js at cs.tu-berlin.de (uni) schilling at fokus.fraunhofer.de (work) Blog: http://schily.blogspot.com/ URL: http://cdrecord.berlios.de/old/private/ ftp://ftp.berlios.de/pub/schily
> [i]What Linux allows you to do is a small subset from that Sun allows you to do with extended attribute files. [...][/i]> [i]It could be done by adding a extended attribute file "system" & another "user" with name value pairs similar to what POSIX.1-2001 extended tar attributes do or it could be implemented in using the "name" as file name and the "value" as file content.[/i]Okay, so it seems like ZFS supports extended attributes using the existing Sun "attribute file" method. More to the point, how well does ZFS support it? Were extended attributes part of the performance goals? How well does ZFS perform when creating, reading, writing, and deleting large numbers of extended attributes of various sizes? IOW, Is the use of extended attributes supported, optimized, and encouraged, or is it merely "supported"? This message posted from opensolaris.org
On Fri, 2005-11-25 at 03:19, John Siracusa wrote:> Does ZFS support extended attributes? By "extended attributes" I mean the association of an arbitrary number of name/value pairs with any file system object. Searching the source for "xattr" turns up a lot of hits, but it seems like that term doesn''t mean what I expect it to mean in the context of ZFS. > > If it is supported, what''s the API?man open, note that the open(2) man page describes openat(2) as well that is how you get to attributes. See also runat(1) for shell scripts. This is the same attribute interface that is used on Solaris for UFS and NFS. -- Darren J Moffat