Print this page
2619 asynchronous destruction of ZFS file systems
2747 SPA versioning with zfs feature flags
Reviewed by: Matt Ahrens <mahrens@delphix.com>
Reviewed by: George Wilson <gwilson@delphix.com>
Reviewed by: Richard Lowe <richlowe@richlowe.net>
Reviewed by: Dan Kruchinin <dan.kruchinin@gmail.com>
Approved by: Dan McDonald <danmcd@nexenta.com>
        
@@ -77,10 +77,12 @@
         /* readonly number properties */
         zprop_register_number(ZPOOL_PROP_SIZE, "size", 0, PROP_READONLY,
             ZFS_TYPE_POOL, "<size>", "SIZE");
         zprop_register_number(ZPOOL_PROP_FREE, "free", 0, PROP_READONLY,
             ZFS_TYPE_POOL, "<size>", "FREE");
+        zprop_register_number(ZPOOL_PROP_FREEING, "freeing", 0, PROP_READONLY,
+            ZFS_TYPE_POOL, "<size>", "FREEING");
         zprop_register_number(ZPOOL_PROP_ALLOCATED, "allocated", 0,
             PROP_READONLY, ZFS_TYPE_POOL, "<size>", "ALLOC");
         zprop_register_number(ZPOOL_PROP_EXPANDSZ, "expandsize", 0,
             PROP_READONLY, ZFS_TYPE_POOL, "<size>", "EXPANDSZ");
         zprop_register_number(ZPOOL_PROP_CAPACITY, "capacity", 0, PROP_READONLY,
@@ -164,10 +166,30 @@
 zpool_prop_default_numeric(zpool_prop_t prop)
 {
         return (zpool_prop_table[prop].pd_numdefault);
 }
 
+/*
+ * Returns true if this is a valid feature@ property.
+ */
+boolean_t
+zpool_prop_feature(const char *name)
+{
+        static const char *prefix = "feature@";
+        return (strncmp(name, prefix, strlen(prefix)) == 0);
+}
+
+/*
+ * Returns true if this is a valid unsupported@ property.
+ */
+boolean_t
+zpool_prop_unsupported(const char *name)
+{
+        static const char *prefix = "unsupported@";
+        return (strncmp(name, prefix, strlen(prefix)) == 0);
+}
+
 int
 zpool_prop_string_to_index(zpool_prop_t prop, const char *string,
     uint64_t *index)
 {
         return (zprop_string_to_index(prop, string, index, ZFS_TYPE_POOL));