]> git.apps.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)
committerChristopher Hoffman <choffman@redhat.com>
Mon, 13 Oct 2025 15:58:42 +0000 (15:58 +0000)
commitdd02ea9b18502b87ce815eba4286ae3516e334b3
tree1b246fc435fa1adcc8031e777b6c7c63914d8356
parentd1afa9815c79cd359bcf9afd5503d3859a2606c2
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>
src/client/Client.cc