GNU bug report logs - #9140
[du] broken on OSX 10.7 (Lion) for >4TB file systems

Previous Next

Package: coreutils;

Reported by: Herb Wartens <hawartens <at> gmail.com>

Date: Thu, 21 Jul 2011 16:04:03 UTC

Severity: normal

Tags: fixed

Done: Assaf Gordon <assafgordon <at> gmail.com>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Jim Meyering <jim <at> meyering.net>
To: Paul Eggert <eggert <at> cs.ucla.edu>
Cc: 9140 <at> debbugs.gnu.org, Bug-gnulib <bug-gnulib <at> gnu.org>, Herb Wartens <hawartens <at> gmail.com>
Subject: bug#9140: Coreutils Bug on OSX 10.7 (Lion)
Date: Fri, 22 Jul 2011 20:15:58 +0200
Paul Eggert wrote:
> Thanks for the further information about the problem with MacOS X 10.7.
> Can you please try this patch?  If you don't have autotools installed,
> you can edit 'configure' by hand and install a similar patch there.
> Thanks.
>
> I have pushed this into gnulib as it seems pretty simple.  The basic
> idea is to avoid statvfs on MacOS X because its block counts can't
> go above 2**31.
>
> Subject: [PATCH 3/3] fsusage: port to MacOS X 10.7 with 4 TiB file systems
>
> * m4/fsusage.m4 (gl_FILE_SYSTEM_USAGE): Reject statvfs
> implementations that use only 32 bits to count blocks.
> On typical hosts with 1024-byte blocks, this fails with file
> systems as small as 4 TiB.  Problem reported by Herb Wartens
> <http://debbugs.gnu.org/9140> and this should also fix a similar
> problem reported by Tim Spriggs <http://debbugs.gnu.org/7355>.
...
> +/* Reject implementations, such as MacOS X 10.7, where f_blocks is a
> +   32-bit quantity; that commonly limits file systems to 4 TiB, a
> +   ridiculously small limit these days.  */
> +struct statvfs fsd;
> +int check_f_blocks_size[sizeof fsd.f_blocks * CHAR_BIT <= 32 ? -1 : 1];
> +]],

Nice.  That looks like it will do the job, and since all statvfs
implementations have the f_blocks member, it should be safe.

Thanks.




This bug report was last modified 6 years and 281 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.