stat reports wrong fundamental block size
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
coreutils (Ubuntu) |
New
|
Low
|
Unassigned |
Bug Description
Binary package hint: coreutils
$ strace -e statfs64 stat -f tmp/hello
statfs64(
statfs64(
File: "tmp/hello"
ID: 0 Namelen: 0 Type: UNKNOWN (0x65735546)
Block size: 1024 Fundamental block size: 1024
Blocks: Total: 4 Free: 0 Available: 0
Inodes: Total: 1 Free: 0
Note that statfs64 returns 512, but stat prints 1024.
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
From http:// thread. gmane.org/ gmane.comp. file-systems. fuse.devel/ 8042/focus= 8052
The problem is this in stat.c:
/* Keep this conditional in sync with the similar conditional in m4/stat- prog.m4. */ STATVFS_ F_BASETYPE || HAVE_STRUCT_ STATVFS_ F_FSTYPENAME \ STATFS_ F_FSTYPENAME && HAVE_STRUCT_ STATVFS_ F_TYPE) ))
../
#if (STAT_STATVFS \
&& (HAVE_STRUCT_
|| (! HAVE_STRUCT_
# define USE_STATVFS 1
#else
# define USE_STATVFS 0
#endif
It hasn't been kept in sync so USE_STATVFS is zero and so the f_frsize
field isn't used at all. I'm not sure what that conditional should be,
but none of those symbols are defined -- there's something wrong with
the configure script that I haven't looked into.