Skip to content

Project quotas not usable after an older pool upgrade #17955

@dusan-gvozdenovic

Description

@dusan-gvozdenovic

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 field os_projectused_dnode.
  • os_projectused_dnode is 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 reason dmu_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.

Include any warning/errors/backtraces from the system logs

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type: DefectIncorrect behavior (e.g. crash, hang)

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions