public inbox for linux-kernel@vger.kernel.org
 help / color / mirror / Atom feed
* strange behaviour with statfs() call, looking for advice
@ 2002-11-11 16:42 Chris Friesen
  2002-11-11 17:53 ` strange behaviour with statfs() call, looking for advice -- followup Chris Friesen
  0 siblings, 1 reply; 2+ messages in thread
From: Chris Friesen @ 2002-11-11 16:42 UTC (permalink / raw)
  To: linux-kernel


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: cfriesen@nortelnetworks.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: strange behaviour with statfs() call, looking for advice -- followup
  2002-11-11 16:42 strange behaviour with statfs() call, looking for advice Chris Friesen
@ 2002-11-11 17:53 ` Chris Friesen
  0 siblings, 0 replies; 2+ messages in thread
From: Chris Friesen @ 2002-11-11 17:53 UTC (permalink / raw)
  To: linux-kernel

Friesen, Christopher [CAR:7Q26:EXCH] wrote:

> 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?

It appears that this is a glibc problem, and it is still present in the 
latest glibc.  Just a warning to people using statfs().

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: cfriesen@nortelnetworks.com


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2002-11-11 17:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2002-11-11 16:42 strange behaviour with statfs() call, looking for advice Chris Friesen
2002-11-11 17:53 ` strange behaviour with statfs() call, looking for advice -- followup Chris Friesen

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox