Project

General

Profile

Bug #40371

cephfs-shell: du must ignore non-directory files

Added by Rishabh Dave almost 5 years ago. Updated over 4 years ago.

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

0%

Source:
Development
Tags:
Backport:
nautilus
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(FS):
cephfs-shell
Labels (FS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

cephfs-shell's du command crashes if it comes across because files that are not directories since it tries to get 'ceph.dir.rbytes' for non-directory files too. I suppose it should ignore all files except for directories, the way GNU du does.

Copying from src/tools/cephfs/cephfs-shell

 for i in reversed(sorted(set(dirwalk(dir_)))):
                    i = os.path.normpath(i)
                    try:
                        xattr = cephfs.getxattr(to_bytes(i), 'ceph.dir.rbytes')
                        self.poutput('{:10s} {}'.format(
                            humansize(int(xattr.decode('utf-8'))), '.' + i))
                    except libcephfs.Error:
continue


Related issues

Copied to CephFS - Backport #41861: nautilus: cephfs-shell: du must ignore non-directory files Rejected

History

#1 Updated by Rishabh Dave almost 5 years ago

  • Status changed from New to Fix Under Review
  • Pull request ID set to 40371
  • Component(FS) cephfs-shell added

#2 Updated by Rishabh Dave almost 5 years ago

  • Pull request ID changed from 40371 to 28560

#3 Updated by Patrick Donnelly almost 5 years ago

  • Target version set to v15.0.0
  • Start date deleted (06/14/2019)
  • Source set to Development
  • Backport set to nautilus

#4 Updated by Patrick Donnelly over 4 years ago

  • Status changed from Fix Under Review to Pending Backport

#5 Updated by Nathan Cutler over 4 years ago

  • Copied to Backport #41861: nautilus: cephfs-shell: du must ignore non-directory files added

#6 Updated by Nathan Cutler over 4 years ago

  • Status changed from Pending Backport to Resolved

Also available in: Atom PDF