df uses incorrect file system block size

Bug #412074 reported by Nikolaus Rath on 2009-08-11
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
coreutils (Ubuntu)
Undecided
Unassigned

Bug Description

Binary package hint: coreutils

$ strace -e statfs64 df tmp/
statfs64("tmp/", 84, {f_type=0x65735546, f_bsize=1024, f_blocks=4, f_bfree=0, f_bavail=0, f_files=1, f_ffree=0, f_fsid={0, 0}, f_namelen=0, f_frsize=512}) = 0
Filesystem 1K-blocks Used Available Use% Mounted on
hello 4 4 0 100% /home/nikratio/tmp

From statvfs(2):

           struct statvfs {
               unsigned long f_bsize; /* file system block size */
               unsigned long f_frsize; /* fragment size */
               fsblkcnt_t f_blocks; /* size of fs in f_frsize units */

So the above system has 4 blocks of 512 bytes, but df reports 4 blocks of 1k bytes. I guess the correct output would be 2 blocks of 1024 bytes.

ProblemType: Bug
Architecture: i386
DistroRelease: Ubuntu 9.04
Package: coreutils 6.10-6ubuntu1
ProcEnviron:
 PATH=(custom, user)
 LANG=en_US.UTF-8
 SHELL=/bin/bash
SourcePackage: coreutils
Uname: Linux 2.6.28-14-generic i686

Nikolaus Rath (nikratio) wrote :
Nikolaus Rath (nikratio) wrote :

The problem is probably the same is in bug 412069

To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers