Bug #22202
closedrgw_statfs should report the correct stats
0%
Description
On NFS-Ganesha/RGW client, "df" command returns 0 for all the fields. It's because the function (https://github.com/ceph/ceph/blob/master/src/rgw/rgw_file.cc#L1606) is setting values to UINT64_MAX. The attribute value in nfs-ganesha is then set to: 18446744073709551615 which is (ffffffffffffffff). It seems like this value is not acceptable when using df command.
Solution:
For the fields that report total cluster size:
1. In case of no quota, call the rados cluster_stat().
https://github.com/supriti/ceph/commit/182f453553adb29b7d9710228d78e7e5991f16cd
2. In case of quotas, we need to understand if nfs-ganesha client is exporting path or bucket.
- In case '/' is exported, we need to check if there is any user quota set. If yes, then report it.
- In case bucket is exported, we need to check if there is any bucket quota set. If yes, then report it.
If "df" is called from sub directory, report the bucket or object size/statistics.
Updated by Matt Benjamin over 6 years ago
- Status changed from New to In Progress
Updated by Matt Benjamin over 6 years ago
The general approach sounds good. Coversation is happening on the attached branch.
Updated by supriti singh over 6 years ago
Matt Benjamin wrote:
ping?
Hi Matt,
Sorry for delay. I have picked up work again on this. I will update branch by next week.
Updated by supriti singh over 6 years ago
supriti singh wrote:
Matt Benjamin wrote:
ping?
Hi Matt,
Sorry for delay. I have picked up work again on this. I will update branch by next week.
Updated by Yehuda Sadeh about 6 years ago
- Status changed from In Progress to Pending Backport
Updated by Nathan Cutler about 6 years ago
- Copied to Backport #23231: luminous: rgw_statfs should report the correct stats added
Updated by Nathan Cutler almost 6 years ago
- Status changed from Pending Backport to Resolved