2002-11-11 16:36:10

by Chris Friesen

[permalink] [raw]
Subject: strange behaviour with statfs() call, looking for advice


I seem to be getting some strange interactions between kernel space and
userspace with the statfs() call.

On an nfs-mounted but unaccessable system, the statfs() call is
returning a block count of 4294967295. Since the kernel statfs struct
has this field defined as a long and this is a 32-bit system, this is
somewhat confusing.

It turns out that the userspace headers define the "blocks" field as a
__fsblkcnt_t, which is then defined as __u_long.

What do I do? Do I cast it to a long since I know that this is what the
kernel is using?

The system in question is a yellowdog system, but the same problem is
present on a recent mandrake box as well. Is this a redhat issue?

Thanks,

Chris

--
Chris Friesen | MailStop: 043/33/F10
Nortel Networks | work: (613) 765-0557
3500 Carling Avenue | fax: (613) 765-2986
Nepean, ON K2H 8E9 Canada | email: [email protected]