storage/drivers/quota
Matt Heon f4c8d96190 Fix assignment of quota IDs for XFS quotas
It appears that setting the FS_XFLAG_PROJINHERIT flag when
assigning a quota to a directory overrides any requested project
ID set (even in the same ioctl!) if a parent directory already
has a project ID. And our parent directories always do, as we set
the top-level directory to the base project ID for all volumes.

The result of this is that the inherit flag forces every
subdirectory to share the same project ID, and thus every time we
set a quota, it's set for everything using quotas - not just the
single directory we wanted to set it on.

Lacking the inherit flag made me a bit worried about
subdirectories, but I can confirm that the quotas themselves are
still function (creating a subdirectory in a dir with a quota set
and creating files in that directory still applies their size
towards the quota). There's a chance it would impact doing a
separate project ID in a subdirectory of a subdirectory but from
my read of the code that isn't supported at all right now.

Fixes RH Jira RHEL-18038

Signed-off-by: Matt Heon <mheon@redhat.com>
2024-05-13 11:52:30 -04:00
..
projectquota.go fix: define quota.BackingFsBlockDeviceLink even if no-cgo 2024-01-15 18:33:37 +03:00
projectquota_supported.go Fix assignment of quota IDs for XFS quotas 2024-05-13 11:52:30 -04:00
projectquota_unsupported.go Format sources with gofumpt 2023-05-26 16:17:31 -07:00