| From | Sent On | Attachments |
|---|---|---|
| Bert de Bruijn | Nov 11, 2005 3:44 am | |
| Sergey Tikhonov | Nov 11, 2005 6:00 am | |
| Sergey Tikhonov | Nov 13, 2005 10:43 pm | |
| Sergey Tikhonov | Nov 13, 2005 10:48 pm | |
| Oliver Falk | Nov 14, 2005 1:37 am | |
| Michal Jaegermann | Nov 14, 2005 9:54 am | |
| Sergey Tikhonov | Nov 14, 2005 11:38 am | |
| Oliver Falk | Nov 14, 2005 3:49 pm | |
| Sergey Tikhonov | Nov 15, 2005 7:13 am | |
| Michal Jaegermann | Nov 15, 2005 7:46 am | |
| Sergey Tikhonov | Nov 15, 2005 8:15 am | |
| Michal Jaegermann | Nov 15, 2005 8:26 am |
| Subject: | Re: statvfs() weirdness on alpha (RH-7.2 and CentOS-4.2) | |
|---|---|---|
| From: | Sergey Tikhonov (ts...@solvo.ru) | |
| Date: | Nov 13, 2005 10:48:29 pm | |
| List: | com.redhat.axp-list | |
Sergey Tikhonov wrote:
Sergey Tikhonov wrote:
Bert de Bruijn wrote:
Somehow I get very strange readings from statvfs() on Alpha.
On Intel $ python
import os print os.statvfs('/')
(4096, 4096, 1033182L, 234938L, 182454L, 525888L, 471255L, 471255L, 0, 255)
is correct. "df" with the same blocksize shows the same values $ df -B 4096 / Filesystem 4K-blocks Used Available Use% Mounted on /dev/hdd1 1033182 798244 182454 82% /
But on Alpha $ python
import os print os.statvfs('/')
(1024, 1024, 738193209530565, 551989197028090, 469096328178340, 0, 0, 255, 0, 0)
that can't be right, the whole / partition is only 500 MB: $ df -B 1024 / Filesystem 1K-blocks Used Available Use% Mounted on /dev/sda2 497861 325987 146170 70% /
469096328178340 is not an integer multiple of 146170.
BTW, this is not a python problem, perl Filesys::Statvfs has the same issues.
Can anybody shed a light on this ?
It seems that it is a problem with python and perl since pure C call to glibc function returns correct values. I'll check out since this doen't work in AC2 too.
Got it. The problem is in glibc with statvfs/statvfs64 functions on alpha (X86_64 doesn't have such problems). As far as I understood statvfs64 is mapped to statvfs function on 64 bit machines, but "struct statvfs" has 32 bits long fields on alpha if compiled without any specific 64bits macros and the same fields become 64 bits long if compiled with -D_LARGEILE64_SOURCE -D_FILE_OFFSET_BITS=64. The problem is that glibc is compiled with 32 bits long fields, but packages like python,perl,gnome uses the macros defined above during building. I might be wrong in my findings, but after recompilation python and gnome packages started to work.
For now I changed 64-bits fields in /usr/inclide/bits/typesizes.h (__FSBLKCNT64_T_TYPE and __FSFILECNT64_T_TYPE) from from __S64_TYPE/__U64_TYPE to __S32_TYPE/__S64_TYPE. Making evething 64-bits would require to rebuild whole AC2 tree. :(
Sorry: __S64_TYPE/__U64_TYPE to __S32_TYPE/__U32_TYPE
Regards,
-- Sergey Tikhonov Solvo Ltd. ts...@solvo.ru





