Add default user/group/project quota properties

This adds default userquota, groupquota, and projectquota properties to
MASTER_NODE_OBJ to make them accessible during zfsvfs_init() (regular
DSL properties require dsl_config_lock, which cannot be safely acquired
in this context). The zfs_fill_zplprops_impl() logic is updated to read
these default properties directly from MASTER_NODE_OBJ.

Signed-off-by: Ameer Hamza <ahamza@ixsystems.com>

Reviewed-by: Alexander Motin <mav@FreeBSD.org>
Reviewed-by: Tony Hutter <hutter2@llnl.gov>
This commit is contained in:
Ameer Hamza
2025-03-09 21:37:26 +05:00
committed by Tony Hutter
parent 7be9fa259e
commit 2a8d9d9607
10 changed files with 333 additions and 2 deletions
+8
View File
@@ -384,6 +384,14 @@ zfs_get_zplprop(objset_t *os, zfs_prop_t prop, uint64_t *value)
*value = ZFS_ACLTYPE_OFF;
#endif
break;
case ZFS_PROP_DEFAULTUSERQUOTA:
case ZFS_PROP_DEFAULTGROUPQUOTA:
case ZFS_PROP_DEFAULTPROJECTQUOTA:
case ZFS_PROP_DEFAULTUSEROBJQUOTA:
case ZFS_PROP_DEFAULTGROUPOBJQUOTA:
case ZFS_PROP_DEFAULTPROJECTOBJQUOTA:
*value = 0;
return (0);
default:
return (error);
}