Print this page
OS-1566 filesystem limits for ZFS datasets

@@ -615,16 +615,18 @@
                 if (!INGLOBALZONE(curproc))
                         return (EPERM);
                 break;
 
         case ZFS_PROP_QUOTA:
+        case ZFS_PROP_FILESYSTEM_LIMIT:
+        case ZFS_PROP_SNAPSHOT_LIMIT:
                 if (!INGLOBALZONE(curproc)) {
                         uint64_t zoned;
                         char setpoint[MAXNAMELEN];
                         /*
                          * Unprivileged users are allowed to modify the
-                         * quota on things *under* (ie. contained by)
+                         * limit on things *under* (ie. contained by)
                          * the thing they own.
                          */
                         if (dsl_prop_get_integer(dsname, "zoned", &zoned,
                             setpoint))
                                 return (EPERM);

@@ -2382,10 +2384,18 @@
                 err = dsl_dir_set_quota(dsname, source, intval);
                 break;
         case ZFS_PROP_REFQUOTA:
                 err = dsl_dataset_set_quota(dsname, source, intval);
                 break;
+        case ZFS_PROP_FILESYSTEM_LIMIT:
+                err = dsl_dir_validate_fs_ss_limit(dsname, intval,
+                    ZFS_PROP_FILESYSTEM_LIMIT);
+                break;
+        case ZFS_PROP_SNAPSHOT_LIMIT:
+                err = dsl_dir_validate_fs_ss_limit(dsname, intval,
+                    ZFS_PROP_SNAPSHOT_LIMIT);
+                break;
         case ZFS_PROP_RESERVATION:
                 err = dsl_dir_set_reservation(dsname, source, intval);
                 break;
         case ZFS_PROP_REFRESERVATION:
                 err = dsl_dataset_set_reservation(dsname, source, intval);