-
Notifications
You must be signed in to change notification settings - Fork 1.9k
Description
System information
| Type | Version/Name |
|---|---|
| Distribution Name | |
| Distribution Version | |
| Kernel Version | |
| Architecture | |
| OpenZFS Version | 2.3 |
Describe the problem you're observing
When upgrading from an older version of ZFS which does not have project quotas to a version of OpenZFS which does, after a zpool upgrade, the feature remains enabled but not active and project operations fail with ENOTSUP, rendering it unusable until a given objset is re-opened.
Description
- On
dmu_objset_open_impl(), if project quotas are present on the pool, a dnode handle is allocated to refer to the projectused dnode and assigned to an in-memory objset fieldos_projectused_dnode. os_projectused_dnodeis used to decide whether project quotas are enabled for a given objset.- After a pool upgrade which enables project quotas, all open objsets still have
os_projectused_dnode == NULL. For this reasondmu_objset_projectquota_enabled()will always be false, and no upgrade will happen until the objset is opened again.
It seems like an analogous issue has been happening with user quotas back in the day and the solution was to suspend and resume the affected file systems in order to re-initialize the affected object sets.
(see zfs_prop_set_special() -> zfs_ioc_userspace_upgrade()). So analogously, we re-initialize all the pool's affected file systems (object sets) when feature@project_quota is set and os_projectused_dnode is NULL.
Describe how to reproduce the problem
This was observed with an upgrade from ZoL 0.7.1 to OpenZFS 2.3.