Anon K Adderlan
2008-Sep-13 22:37 UTC
[zfs-discuss] How do I add my own Attributes to a ZAP object, and then search on it?
How do I add my own Attributes to a ZAP object, and then search on it? For example, I want to be able to attach the gamma value to each image, and be able to search and sort them based on it. From reading the on disk format documentation I''ve been led to believe that this would be done through ZAP objects, but what I really need is a reference to the C/C++ or Shell API, and whoever put together the Administration Guide has for some reason decided that the code segments should be in a white font on a white background. -- This message posted from opensolaris.org
Mattias Pantzare
2008-Sep-13 23:38 UTC
[zfs-discuss] How do I add my own Attributes to a ZAP object, and then search on it?
On Sun, Sep 14, 2008 at 12:37 AM, Anon K Adderlan <chaosvoyager at gmail.com> wrote:> How do I add my own Attributes to a ZAP object, and then search on it? > > For example, I want to be able to attach the gamma value to each image, and be able to search and > sort them based on it. From reading the on disk format documentation I''ve been led to believe that this > would be done through ZAP objects, but what I really need is a reference to the C/C++ or Shell API, and > whoever put together the Administration Guide has for some reason decided that the code segments should > be in a white font on a white background.You can''t access ZFS internals from applications. A database sounds like the right solution, but you could use extended attributes. This is from What''s New in the Solaris 9 8/03 Operating Environment, http://docs.sun.com/app/docs/doc/817-0493/6mg9pruau?a=view Extended File Attributes The UFS, NFS, and TMPFS file systems have been enhanced to include extended file attributes. Application developers can associate specific attributes to a file. For example, a developer of a file management application for a windowing system might choose to associate a display icon with a file. Extended attributes are logically represented as files within a hidden directory that is associated with the target file. You can use the extended file attribute API and a set of shell commands to add and manipulate file system attributes. See the fsattr(5), openat(2), and runat(1) man pages for more information. Many file system commands in Solaris provide an attribute-aware option that you can use to query, copy, modify, or find file attributes. For more information, see the specific file system command in the man pages.
Richard Elling
2008-Sep-14 16:00 UTC
[zfs-discuss] How do I add my own Attributes to a ZAP object, and then search on it?
Anon K Adderlan wrote:> How do I add my own Attributes to a ZAP object, and then search on it? > > For example, I want to be able to attach the gamma value to each image, and be able to search and sort them based on it. From reading the on disk format documentation I''ve been led to believe that this would be done through ZAP objects, but what I really need is a reference to the C/C++ or Shell API, and whoever put together the Administration Guide has for some reason decided that the code segments should be in a white font on a white background. >This docs are fine. If you are using b92-b96, then you are hitting a bug in the freetype2 package. Upgrade to a later build, or at least grab the freetype2 package from a later release. -- richard