Print this page
cstyle fixes
dsl_dataset_set_fsid_guid should use ZFS_SPACE_CHECK_RESERVED
dsl_dataset_set_fsid_guid _check and _sync func declared static,
removed from dsl_dataset.h
rewrite unique_valid
6333 ZFS should let the user specify or modify the fsid_guid of a dataset
*** 97,106 ****
--- 97,121 ----
mutex_exit(&unique_mtx);
return (un->un_value);
}
+ boolean_t
+ unique_valid(uint64_t value)
+ {
+ unique_t un_tofind;
+
+ un_tofind.un_value = value;
+
+ mutex_enter(&unique_mtx);
+ boolean_t rv = ((value & ~UNIQUE_MASK) == 0 &&
+ avl_find(&unique_avl, &un_tofind, NULL) == NULL);
+ mutex_exit(&unique_mtx);
+
+ return (rv);
+ }
+
void
unique_remove(uint64_t value)
{
unique_t un_tofind;
unique_t *un;