Commit dd02ea9
committed
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 <[email protected]>1 parent d1afa98 commit dd02ea9
1 file changed
+9
-8
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12661 | 12661 | | |
12662 | 12662 | | |
12663 | 12663 | | |
12664 | | - | |
| 12664 | + | |
| 12665 | + | |
12665 | 12666 | | |
12666 | | - | |
| 12667 | + | |
12667 | 12668 | | |
12668 | 12669 | | |
12669 | 12670 | | |
| |||
12693 | 12694 | | |
12694 | 12695 | | |
12695 | 12696 | | |
12696 | | - | |
| 12697 | + | |
12697 | 12698 | | |
12698 | 12699 | | |
12699 | 12700 | | |
12700 | 12701 | | |
12701 | | - | |
| 12702 | + | |
12702 | 12703 | | |
12703 | 12704 | | |
12704 | 12705 | | |
12705 | 12706 | | |
12706 | 12707 | | |
12707 | | - | |
| 12708 | + | |
12708 | 12709 | | |
12709 | 12710 | | |
12710 | 12711 | | |
12711 | 12712 | | |
12712 | | - | |
| 12713 | + | |
12713 | 12714 | | |
12714 | 12715 | | |
12715 | 12716 | | |
12716 | 12717 | | |
12717 | 12718 | | |
12718 | 12719 | | |
12719 | 12720 | | |
12720 | | - | |
12721 | | - | |
| 12721 | + | |
| 12722 | + | |
12722 | 12723 | | |
12723 | 12724 | | |
12724 | 12725 | | |
| |||
0 commit comments