Project

General

Profile

Actions

Bug #22202

closed

rgw_statfs should report the correct stats

Added by supriti singh over 6 years ago. Updated almost 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
% Done:

0%

Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:
Crash signature (v1):
Crash signature (v2):

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.


Related issues 1 (0 open1 closed)

Copied to rgw - Backport #23231: luminous: rgw_statfs should report the correct statsResolvedNathan CutlerActions
Actions

Also available in: Atom PDF