I'm playing around with using ZFS on a laptop, and I want to add a property that identifies the pool as a laptop pool.
My first thought was to add my own zpool property. However, I ran into problems because of an apparent mismatch between the zfs_prop_t enum in usr/src/uts/common/sys/fs/zfs.h and the zfs_prop_table in usr/src/common/zfs/zfs_prop.c. See the forum thread http://www.opensolaris.org/jive/thread.jspa?threadID=39359 for more details. A response in the above thread encouraged me to wait for PSARC 2007/342 "Enhanced ZFS Pool Properties" which looks like it will be in snv_75, and 6582456 "property code is overdue for some spring cleaning" which is already in snv_71. In the meantime, it was suggested I try using a zfs filesystem user property. This would be easier for me since I wouldn?t have to write as much code. I started down this path, but I had trouble figuring out how to access user properties from within the kernel. (This does sound inappropriate (the kernel using user properties!) now that I think about it.) However, it will allow me to continue with my experiment until snv_75 comes out. Certainly, true ZFS kernel changes shouldn?t be accessing user properties. If you have any advice on this, please let me know. So? continuing on with perhaps an interim solution, I am experimenting with the dsl_prop_get and more specifically the dsl_prop_get_integer call. I?m confused by the first argument of the method, i.e., ddname. Is this the name of my top level file system which happens to also be the name of my pool? If so, can I just use spa->spa_name for the ddname argument? Duff -- This messages posted from opensolaris.org