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.