Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Storage: Fix unnecessary dir project quota updates (from Incus) #14019

Merged
merged 3 commits into from
Aug 30, 2024

Conversation

hamistao
Copy link
Contributor

@hamistao hamistao commented Aug 30, 2024

Fixes #13115

This avoids setting project quotas when the project does not change (from Incus), and also avoids unnecessary project setting on DeleteProject.

Reported-by: Marius Klocke [email protected]

Closes #13813

@github-actions github-actions bot added Documentation Documentation needs updating API Changes to the REST API labels Aug 30, 2024
@github-actions github-actions bot removed Documentation Documentation needs updating API Changes to the REST API labels Aug 30, 2024
stgraber and others added 2 commits August 30, 2024 12:08
…anges

Signed-off-by: Stéphane Graber <[email protected]>
Reported-by: Marius Klocke <[email protected]>
(cherry picked from commit 4d4f97804721014a78fefb16d10126ae5556d436)
Signed-off-by: hamistao <[email protected]>
License: Apache-2.0
`DeleteProject` unsets the project for the path unnecessarily since the new project will be set afterwards. And that is an expensive operation since it implies another filepath walk. So this just unsets the quota on the project instead.

Signed-off-by: hamistao <[email protected]>
@hamistao hamistao changed the title Improve_quota_updates Improve quota updates Aug 30, 2024
@hamistao hamistao changed the title Improve quota updates lxd/drivers/dir: Improve quota updates Aug 30, 2024
@hamistao hamistao changed the title lxd/drivers/dir: Improve quota updates lxd/drivers/dir: Improve quota updates (From Incus) Aug 30, 2024
@tomponline tomponline changed the title lxd/drivers/dir: Improve quota updates (From Incus) lxd/drivers/dir: Improve quota updates (from Incus) Aug 30, 2024
tomponline
tomponline previously approved these changes Aug 30, 2024
@tomponline tomponline marked this pull request as ready for review August 30, 2024 15:35
@hamistao
Copy link
Contributor Author

hamistao commented Aug 30, 2024

@tomponline I am done with my tests and this should be safe to merge. Just pushed a small change to use an existing variable instead of getting the value again.

@tomponline tomponline changed the title lxd/drivers/dir: Improve quota updates (from Incus) Storage: Improve dir project quota updates (from Incus) Aug 30, 2024
@tomponline tomponline changed the title Storage: Improve dir project quota updates (from Incus) Storage: Fix unnecessary dir project quota updates (from Incus) Aug 30, 2024
@tomponline tomponline merged commit 4c020e2 into canonical:main Aug 30, 2024
29 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Modifying disk quotas causes unnecessary file attribute updates
3 participants