Project

General

Profile

Actions

Bug #20178

closed

df reports negative disk "used" value when quota exceed

Added by xiaomeng tu almost 7 years ago. Updated about 5 years ago.

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

0%

Source:
Tags:
Backport:
jewel, kraken
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
fs
Component(FS):
ceph-fuse
Labels (FS):
quotas
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

first, set the maxbytes quota for a directory in cephfs,for example the directory named test and the quota is 10G;

then mount the cephfs : ceph-fuse -n client.admin /mnt/cephfs -r /test;

then write some test data :dd if=/dev/zero of=/mnt/cephfs/file bs=1M count=20000;

check the "df -h" command output:
Filesystem Size Used Avail Use% Mounted on
ceph-fuse 10G -64Y -6.0G 100% /mnt/cephfs

use the "strace df" , a syscall shows :
statfs64("/mnt/cephfs", {f_type=0x65735546, f_bsize=4194304, f_blocks=2560, f_bfree=18446744073709550080, f_bavail=18446744073709550080, f_fsid={0, 0}, f_namelen=255, f_frsize=4194304}) = 0

obviously f_bfree is wrong, and its value is 2^64, 64Y is 2^86

This bug was found on ceph-10.2.7, but 12.0.2 has this problem too.


Related issues 2 (0 open2 closed)

Copied to CephFS - Backport #20349: jewel: df reports negative disk "used" value when quota exceedResolvedWei-Chung ChengActions
Copied to CephFS - Backport #20350: kraken: df reports negative disk "used" value when quota exceedRejectedActions
Actions #1

Updated by John Spray almost 7 years ago

  • Status changed from New to Fix Under Review
  • Backport set to jewel, kraken
Actions #2

Updated by John Spray almost 7 years ago

  • Status changed from Fix Under Review to Pending Backport
Actions #3

Updated by Nathan Cutler almost 7 years ago

  • Copied to Backport #20349: jewel: df reports negative disk "used" value when quota exceed added
Actions #4

Updated by Nathan Cutler almost 7 years ago

  • Copied to Backport #20350: kraken: df reports negative disk "used" value when quota exceed added
Actions #5

Updated by Nathan Cutler over 6 years ago

  • Status changed from Pending Backport to Resolved
Actions #6

Updated by Patrick Donnelly about 5 years ago

  • Category deleted (97)
  • Labels (FS) quotas added
Actions

Also available in: Atom PDF