HomeFreeBSD

Fix projid accounting for xattr objects

Description

Fix projid accounting for xattr objects

zpool upgraded with 'feature@project_quota' needs re-layout of SA's
to fix the SA_ZPL_PROJID at SA_PROJID_OFFSET (128). Its necessary for
the correct accounting of object usage against its projid.
Old object (created before upgrade) when gets a projid assigned, its
SA gets re-layout via sa_add_projid(). If object has xattr dir, SA
of xattr dir also gets re-layout. But SA re-layout of xattr objects
inside a xattr dir is not done.

Fix zfs_setattr_dir() to re-layout SA's on xattr objects, when setting
projid on old xattr object (created before upgrade).

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Jitendra Patidar <jitendra.patidar@nutanix.com>
Closes #16355
Closes #16356

Details

Provenance
Jitendra Patidar <jitendra.patidar@nutanix.com>Authored on Aug 15 2024, 12:59 AM
GitHub <noreply@github.com>Committed on Aug 15 2024, 12:59 AM
Parents
rG244ea5c4881f: Add missing kstats to dataset kstats
Branches
Unknown
Tags
Unknown

Event Timeline

GitHub <noreply@github.com> committed rGd2ccc2155217: Fix projid accounting for xattr objects (authored by Jitendra Patidar <jitendra.patidar@nutanix.com>).Aug 15 2024, 12:59 AM