df uses incorrect file system block size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
coreutils (Ubuntu) |
New
|
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 {
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
The problem is probably the same is in bug 412069