]> git-server-git.apps.pok.os.sepia.ceph.com Git - ceph.git/commit
client: account for mixed quotas in statfs
authorChristopher Hoffman <choffman@redhat.com>
Fri, 10 Oct 2025 14:47:08 +0000 (14:47 +0000)
committerJos Collin <jcollin@redhat.com>
Tue, 2 Dec 2025 01:57:32 +0000 (07:27 +0530)
commit8c05924f5430038e1c9b9cfe28252b4155fb5a5a
treed911e2427b53467f99a2986ccafc02a14ab46ea9
parent97ce8955f4e5991e6c5dfaadba617bf47a2d1178
client: account for mixed quotas in statfs

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>
(cherry picked from commit dd02ea9b18502b87ce815eba4286ae3516e334b3)
src/client/Client.cc