Bug 53741

Summary: Used block count in df output
Product: File System Reporter: mujeeb.adil
Component: ext4Assignee: fs_ext4 (fs_ext4)
Status: CLOSED INVALID    
Severity: low CC: alan, mujeeb.adil, sandeen
Priority: P1    
Hardware: All   
OS: Linux   
URL: http://marc.info/?l=linux-ext4&m=136021915127138&w=2
Kernel Version: 2.6.32 Subsystem:
Regression: No Bisected commit-id:

Description mujeeb.adil 2013-02-13 05:15:23 UTC
I have an observation on EXT4 filesystem. I created filesystem of size
1TB, 4TB, and 7TB and then checked the output of df command.

df command showed the number of 1KB blocks used. The result was:
1TB: 204056
4TB: 198680
7TB: 181784

I performed the same on XFS and the result was:
1TB: 32928
4TB: 32928
7TB: 33024

EXT4 result shows with increasing filesystem size, the number of used
blocks decreased. This looks odd.

From the linux-ext4 mailing list discussion (http://marc.info/?l=linux-ext4&m=136021915127138&w=2), it seems to be a bug in df reporting.
Comment 1 Eric Sandeen 2013-02-13 05:21:01 UTC
Specifically, I think this is a problem with the overhead calculations done in the default "bsddf" freespace reporting, which tries to not count the fundamental filesystem metadata blocks as "used".  With mount -o minixdf, which is the straightforward "report all blocks used as used" mode, the df output makes sense.