Skip to content

client: account for mixed quotas in statfs#65918

Merged
vshankar merged 2 commits intoceph:mainfrom
chrisphoffman:wip-choffman-73487
Nov 17, 2025
Merged

client: account for mixed quotas in statfs#65918
vshankar merged 2 commits intoceph:mainfrom
chrisphoffman:wip-choffman-73487

Conversation

@chrisphoffman
Copy link
Contributor

https://tracker.ceph.com/issues/73487

Contribution Guidelines

  • To sign and title your commits, please refer to Submitting Patches to Ceph.

  • If you are submitting a fix for a stable branch (e.g. "quincy"), please refer to Submitting Patches to Ceph - Backports for the proper workflow.

  • When filling out the below checklist, you may click boxes directly in the GitHub web UI. When entering or editing the entire PR message in the GitHub web UI editor, you may also select a checklist item by adding an x between the brackets: [x]. Spaces and capitalization matter when checking off items this way.

Checklist

  • Tracker (select at least one)
    • References tracker ticket
    • Very recent bug; references commit where it was introduced
    • New feature (ticket optional)
    • Doc update (no ticket needed)
    • Code cleanup (no ticket needed)
  • Component impact
    • Affects Dashboard, opened tracker ticket
    • Affects Orchestrator, opened tracker ticket
    • No impact that needs to be tracked
  • Documentation (select at least one)
    • Updates relevant documentation
    • No doc update is appropriate
  • Tests (select at least one)
Show available Jenkins commands

You must only issue one Jenkins command per-comment. Jenkins does not understand
comments with more than one command.

In statfs, when the quota root for a dir is discovered,
it uses that dir to base values for max_files and max_bytes.

This can be an issue when a dir is found with only one of two potential quota
fields. Take for instance, a dir with only max_files set and parent dir
has only max_bytes set. During a statfs call, it will then use the max_files
value for provided dir, but does not have a value for max_bytes. In this case,
this behavior will cause the size of the filesystem to be displayed.

Instead, find the quota root for max_files and max_bytes separately. This will
allow for mixed quotas to inherit missing values from its parent. In the above
example, max_files from current dir and max_bytes from parent dir will be
displayed.

Fixes: https://tracker.ceph.com/issues/73487
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
Signed-off-by: Christopher Hoffman <choffman@redhat.com>
@github-actions github-actions bot added cephfs Ceph File System tests labels Oct 13, 2025
@chrisphoffman chrisphoffman requested a review from a team October 13, 2025 16:05
@dparmar18 dparmar18 self-assigned this Oct 13, 2025
@vshankar vshankar self-assigned this Oct 28, 2025
Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Nice catch!

@vshankar
Copy link
Contributor

jenkins test make check

@vshankar
Copy link
Contributor

vshankar commented Nov 2, 2025

This PR is under test in https://tracker.ceph.com/issues/73693.

Copy link
Contributor

@vshankar vshankar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@vshankar vshankar merged commit 0666c09 into ceph:main Nov 17, 2025
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants