Project

General

Profile

Bug #20178

df reports negative disk "used" value when quota exceed

Added by xiaomeng tu about 2 months ago. Updated about 1 month ago.

Status:
Pending Backport
Priority:
Normal
Assignee:
-
Category:
Quotas
Target version:
Start date:
06/05/2017
Due date:
% Done:

0%

Source:
Tags:
Backport:
jewel, kraken
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
fs
Release:
kraken
Component(FS):
ceph-fuse
Needs Doc:
No

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

Copied to fs - Backport #20349: jewel: df reports negative disk "used" value when quota exceed In Progress
Copied to fs - Backport #20350: kraken: df reports negative disk "used" value when quota exceed New

History

#1 Updated by John Spray about 2 months ago

  • Status changed from New to Need Review
  • Backport set to jewel, kraken

#2 Updated by John Spray about 1 month ago

  • Status changed from Need Review to Pending Backport

#3 Updated by Nathan Cutler about 1 month ago

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

#4 Updated by Nathan Cutler about 1 month ago

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

Also available in: Atom PDF