Project

General

Profile

Bug #22202

rgw_statfs should report the correct stats

Added by supriti singh over 1 year ago. Updated about 1 year ago.

Status:
Resolved
Priority:
Normal
Assignee:
Target version:
Start date:
11/20/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
luminous
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Pull request ID:

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

Copied to rgw - Backport #23231: luminous: rgw_statfs should report the correct stats Resolved

History

#1 Updated by Abhishek Lekshmanan over 1 year ago

  • Assignee set to supriti singh

#2 Updated by Matt Benjamin over 1 year ago

  • Status changed from New to In Progress

#3 Updated by Matt Benjamin over 1 year ago

The general approach sounds good. Coversation is happening on the attached branch.

#4 Updated by Matt Benjamin over 1 year ago

ping?

#5 Updated by supriti singh over 1 year 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.

#6 Updated by supriti singh over 1 year 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.

https://github.com/ceph/ceph/pull/20093

#7 Updated by Nathan Cutler over 1 year ago

  • Backport set to luminous

#8 Updated by Yehuda Sadeh over 1 year ago

  • Status changed from In Progress to Pending Backport

#9 Updated by Nathan Cutler over 1 year ago

  • Copied to Backport #23231: luminous: rgw_statfs should report the correct stats added

#10 Updated by Nathan Cutler about 1 year ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF