bug-gnulib
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: fsusage: dynamic statvfs() check incorrect for Debian 7.0


From: Eric Wong
Subject: Re: fsusage: dynamic statvfs() check incorrect for Debian 7.0
Date: Wed, 30 Jan 2013 02:44:56 +0000
User-agent: Mutt/1.5.21 (2010-09-15)

Paul Eggert <address@hidden> wrote:
> On 01/29/2013 05:28 PM, Eric Wong wrote:
> > So I think the correct solution would be to check the __ABI_TAG_VERSION
> > in the PT_NOTE section, but I haven't figured out how to do that at
> > runtime...  (ref: csu/abi-note.S in glibc source tree).
> 
> Sorry, I'm afraid I'm lost.  I don't know what the bug is,
> or why gnulib would need to change in order to be portable
> to Debian 7.0.

Sorry for the confusing writeup.  Hopefully I can clarify.

The uname() check in fsusage on the running kernel alone is insufficient.

eglibc on Debian is only configured to only use features available in
Linux 2.6.26 at build time.  This means statvfs() uses stat() internally
regardless of the run-time kernel version[1].

fsusage needs to check which version of Linux glibc/eglibc is built for
(which I haven't figured out how to check).

The easiest change is to go back to avoid using statvfs() entirely on
Linux for now, but I hate this option...

Another option is to use ST_VALID via statfs() directly when uname()
sees >=2.6.36.  This is what glibc/eglibc does with statvfs() if
it's built for >=2.6.36


[1] - we want to avoid stat() because it gets stuck on offline mounts



reply via email to

[Prev in Thread] Current Thread [Next in Thread]