-
Notifications
You must be signed in to change notification settings - Fork 124
fix: cephmount: call GetQuota on received path, not on root #5486
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
base: master
Are you sure you want to change the base?
Conversation
labkode
commented
Jan 23, 2026
- Calls GetQuota on the passed path vs the root mountpoint.
- Remove unused function.
|
Thanks for opening this pull request! The maintainers of this repository would appreciate it if you would create a changelog item based on your changes. |
glpatcern
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks Hugo, just reporting here the comment in the chat
| maxQuotaData, err := xattr.Get(fullPath, "ceph.quota.max_bytes") | ||
| if err != nil { | ||
| log.Debug().Msg("cephmount: user.quota.max_bytes xattr not set, using default") | ||
| log.Debug().Msg("cephmount: ceph.quota.max_bytes xattr not set, using default") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
So here we should traverse the tree to the top, looking for quota attributes and return the lowest value, defaulting to the whole mount only if none is found, right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
And even if we go for a basic approach with no hierarchy of quotas (which I think it's fine), how do we know which node of the path holds the attribute? Or is this function only called at the root of the "Space"? cc @jessegeens
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The GetQuota call is made to the requested path, if the attribute is recursively applied to all directories, there is no need to go up in the parents.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ok then I was not clear in what is "recursive": the quota is (recursively) applied to all directories down the tree, but there's no attribute visible anywhere except at the quota node, so one has to traverse the parents to get there