Print this page
Temp stuff on salted-hash for DDT.


 106             PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "DELEGATION",
 107             boolean_table);
 108         zprop_register_index(ZPOOL_PROP_AUTOREPLACE, "autoreplace", 0,
 109             PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "REPLACE", boolean_table);
 110         zprop_register_index(ZPOOL_PROP_LISTSNAPS, "listsnapshots", 0,
 111             PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "LISTSNAPS",
 112             boolean_table);
 113         zprop_register_index(ZPOOL_PROP_AUTOEXPAND, "autoexpand", 0,
 114             PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "EXPAND", boolean_table);
 115         zprop_register_index(ZPOOL_PROP_READONLY, "readonly", 0,
 116             PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "RDONLY", boolean_table);
 117 
 118         /* default index properties */
 119         zprop_register_index(ZPOOL_PROP_FAILUREMODE, "failmode",
 120             ZIO_FAILURE_MODE_WAIT, PROP_DEFAULT, ZFS_TYPE_POOL,
 121             "wait | continue | panic", "FAILMODE", failuremode_table);
 122 
 123         /* hidden properties */
 124         zprop_register_hidden(ZPOOL_PROP_NAME, "name", PROP_TYPE_STRING,
 125             PROP_READONLY, ZFS_TYPE_POOL, "NAME");


 126 }
 127 
 128 /*
 129  * Given a property name and its type, returns the corresponding property ID.
 130  */
 131 zpool_prop_t
 132 zpool_name_to_prop(const char *propname)
 133 {
 134         return (zprop_name_to_prop(propname, ZFS_TYPE_POOL));
 135 }
 136 
 137 /*
 138  * Given a pool property ID, returns the corresponding name.
 139  * Assuming the pool propety ID is valid.
 140  */
 141 const char *
 142 zpool_prop_to_name(zpool_prop_t prop)
 143 {
 144         return (zpool_prop_table[prop].pd_name);
 145 }




 106             PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "DELEGATION",
 107             boolean_table);
 108         zprop_register_index(ZPOOL_PROP_AUTOREPLACE, "autoreplace", 0,
 109             PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "REPLACE", boolean_table);
 110         zprop_register_index(ZPOOL_PROP_LISTSNAPS, "listsnapshots", 0,
 111             PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "LISTSNAPS",
 112             boolean_table);
 113         zprop_register_index(ZPOOL_PROP_AUTOEXPAND, "autoexpand", 0,
 114             PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "EXPAND", boolean_table);
 115         zprop_register_index(ZPOOL_PROP_READONLY, "readonly", 0,
 116             PROP_DEFAULT, ZFS_TYPE_POOL, "on | off", "RDONLY", boolean_table);
 117 
 118         /* default index properties */
 119         zprop_register_index(ZPOOL_PROP_FAILUREMODE, "failmode",
 120             ZIO_FAILURE_MODE_WAIT, PROP_DEFAULT, ZFS_TYPE_POOL,
 121             "wait | continue | panic", "FAILMODE", failuremode_table);
 122 
 123         /* hidden properties */
 124         zprop_register_hidden(ZPOOL_PROP_NAME, "name", PROP_TYPE_STRING,
 125             PROP_READONLY, ZFS_TYPE_POOL, "NAME");
 126         zprop_register_hidden(ZPOOL_PROP_DDT_SALT, "ddt_salt", PROP_TYPE_STRING,
 127             PROP_READONLY, ZFS_TYPE_POOL, "DDT_SALT");
 128 }
 129 
 130 /*
 131  * Given a property name and its type, returns the corresponding property ID.
 132  */
 133 zpool_prop_t
 134 zpool_name_to_prop(const char *propname)
 135 {
 136         return (zprop_name_to_prop(propname, ZFS_TYPE_POOL));
 137 }
 138 
 139 /*
 140  * Given a pool property ID, returns the corresponding name.
 141  * Assuming the pool propety ID is valid.
 142  */
 143 const char *
 144 zpool_prop_to_name(zpool_prop_t prop)
 145 {
 146         return (zpool_prop_table[prop].pd_name);
 147 }