Print this page
OS-1566 dataset quota for ZFS datasets
@@ -615,10 +615,12 @@
if (!INGLOBALZONE(curproc))
return (EPERM);
break;
case ZFS_PROP_QUOTA:
+ case ZFS_PROP_DATASET_QUOTA:
+ case ZFS_PROP_SNAPSHOT_QUOTA:
if (!INGLOBALZONE(curproc)) {
uint64_t zoned;
char setpoint[MAXNAMELEN];
/*
* Unprivileged users are allowed to modify the
@@ -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_DATASET_QUOTA:
+ err = dsl_dir_validate_ds_ss_quota(dsname, intval,
+ ZFS_PROP_DATASET_QUOTA);
+ break;
+ case ZFS_PROP_SNAPSHOT_QUOTA:
+ err = dsl_dir_validate_ds_ss_quota(dsname, intval,
+ ZFS_PROP_SNAPSHOT_QUOTA);
+ 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);