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

@@ -1482,10 +1482,16 @@
                 } else {
                         (void) zfs_standard_error(hdl, err, errbuf);
                 }
                 break;
 
+        case EEXIST:
+                zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+                    "fsid_guid is invalid or already in use"));
+                (void) zfs_error(hdl, EZFS_BADPROP, errbuf);
+                break;
+
         case EOVERFLOW:
                 /*
                  * This platform can't address a volume this big.
                  */
 #ifdef _ILP32

@@ -2491,10 +2497,11 @@
                         free(ascii);
                 }
                 break;
 
         case ZFS_PROP_GUID:
+        case ZFS_PROP_FSID_GUID:
                 /*
                  * GUIDs are stored as numbers, but they are identifiers.
                  * We don't want them to be pretty printed, because pretty
                  * printing mangles the ID into a truncated and useless value.
                  */

@@ -3276,10 +3283,15 @@
                 case ENOTSUP:
                         zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
                             "pool must be upgraded to set this "
                             "property or value"));
                         return (zfs_error(hdl, EZFS_BADVERSION, errbuf));
+
+                case EEXIST:
+                        zfs_error_aux(hdl, dgettext(TEXT_DOMAIN,
+                            "fsid_guid is invalid or already in use"));
+                        return (zfs_error(hdl, EZFS_BADPROP, errbuf));
 #ifdef _ILP32
                 case EOVERFLOW:
                         /*
                          * This platform can't address a volume this big.
                          */