public inbox for linux-xfs@vger.kernel.org
 help / color / mirror / Atom feed
* xfs_io: fix test for fallocate on 32bit boxes
@ 2009-06-15 19:43 Eric Sandeen
  2009-06-15 20:12 ` Olaf Weber
  2009-06-16 14:04 ` Christoph Hellwig
  0 siblings, 2 replies; 4+ messages in thread
From: Eric Sandeen @ 2009-06-15 19:43 UTC (permalink / raw)
  To: xfs-oss

xfs_io: fix test for fallocate on 32bit boxes

As per Red Hat bug 500487, fallocate64 is missing in glibc,
so attempts to build with fallocate and _FILE_OFFSET_BITS=64
will fail.

So, change the config to test the way we will build, and
it'll fail properly on x86 until glibc gets fixed.

Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
---

diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
index 1ac4666..1c1859d 100644
--- a/m4/package_libcdev.m4
+++ b/m4/package_libcdev.m4
@@ -105,6 +105,9 @@ AC_DEFUN([AC_HAVE_GETMNTINFO],
 AC_DEFUN([AC_HAVE_FALLOCATE],
   [ AC_MSG_CHECKING([for fallocate])
     AC_TRY_LINK([
+#define _GNU_SOURCE
+#define _FILE_OFFSET_BITS 64
+#include <fcntl.h>
 #include <linux/falloc.h>
     ], [
          fallocate(0, 0, 0, 0);


_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: xfs_io: fix test for fallocate on 32bit boxes
  2009-06-15 19:43 xfs_io: fix test for fallocate on 32bit boxes Eric Sandeen
@ 2009-06-15 20:12 ` Olaf Weber
  2009-06-16 14:04 ` Christoph Hellwig
  1 sibling, 0 replies; 4+ messages in thread
From: Olaf Weber @ 2009-06-15 20:12 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs-oss

Looks good.


Reviewed-by: Olaf Weber <olaf@sgi.com>



Eric Sandeen writes:

> xfs_io: fix test for fallocate on 32bit boxes
> As per Red Hat bug 500487, fallocate64 is missing in glibc,
> so attempts to build with fallocate and _FILE_OFFSET_BITS=64
> will fail.

> So, change the config to test the way we will build, and
> it'll fail properly on x86 until glibc gets fixed.

> Signed-off-by: Eric Sandeen <sandeen@sandeen.net>
> ---

> diff --git a/m4/package_libcdev.m4 b/m4/package_libcdev.m4
> index 1ac4666..1c1859d 100644
> --- a/m4/package_libcdev.m4
> +++ b/m4/package_libcdev.m4
> @@ -105,6 +105,9 @@ AC_DEFUN([AC_HAVE_GETMNTINFO],
>  AC_DEFUN([AC_HAVE_FALLOCATE],
>    [ AC_MSG_CHECKING([for fallocate])
>      AC_TRY_LINK([
> +#define _GNU_SOURCE
> +#define _FILE_OFFSET_BITS 64
> +#include <fcntl.h>
>  #include <linux/falloc.h>
>      ], [
>           fallocate(0, 0, 0, 0);


> _______________________________________________
> xfs mailing list
> xfs@oss.sgi.com
> http://oss.sgi.com/mailman/listinfo/xfs


-- 
Olaf Weber                 SGI               Phone:  +31(0)30-6696752
                           Veldzigt 2b       Fax:    +31(0)30-6696799
Technical Lead             3454 PW de Meern  Vnet:   955-7151
Storage Software           The Netherlands   Email:  olaf@sgi.com

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: xfs_io: fix test for fallocate on 32bit boxes
  2009-06-15 19:43 xfs_io: fix test for fallocate on 32bit boxes Eric Sandeen
  2009-06-15 20:12 ` Olaf Weber
@ 2009-06-16 14:04 ` Christoph Hellwig
  2009-06-16 15:04   ` Eric Sandeen
  1 sibling, 1 reply; 4+ messages in thread
From: Christoph Hellwig @ 2009-06-16 14:04 UTC (permalink / raw)
  To: Eric Sandeen; +Cc: xfs-oss

On Mon, Jun 15, 2009 at 02:43:04PM -0500, Eric Sandeen wrote:
> xfs_io: fix test for fallocate on 32bit boxes
> 
> As per Red Hat bug 500487, fallocate64 is missing in glibc,
> so attempts to build with fallocate and _FILE_OFFSET_BITS=64
> will fail.
> 
> So, change the config to test the way we will build, and
> it'll fail properly on x86 until glibc gets fixed.

Yikes.  What's the status of actually getting it fixed in glibc?
Otherwise we might have to switch to the raw syscall as ugly
as it might be.

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

* Re: xfs_io: fix test for fallocate on 32bit boxes
  2009-06-16 14:04 ` Christoph Hellwig
@ 2009-06-16 15:04   ` Eric Sandeen
  0 siblings, 0 replies; 4+ messages in thread
From: Eric Sandeen @ 2009-06-16 15:04 UTC (permalink / raw)
  To: Christoph Hellwig; +Cc: xfs-oss

Christoph Hellwig wrote:
> On Mon, Jun 15, 2009 at 02:43:04PM -0500, Eric Sandeen wrote:
>> xfs_io: fix test for fallocate on 32bit boxes
>>
>> As per Red Hat bug 500487, fallocate64 is missing in glibc,
>> so attempts to build with fallocate and _FILE_OFFSET_BITS=64
>> will fail.
>>
>> So, change the config to test the way we will build, and
>> it'll fail properly on x86 until glibc gets fixed.
> 
> Yikes.  What's the status of actually getting it fixed in glibc?
> Otherwise we might have to switch to the raw syscall as ugly
> as it might be.
> 

>From the bug:

Comment #6 From  Jakub Jelinek (jakub@redhat.com)  2009-06-11 16:40:37 EDT

Unfortunately no, this can't be backported.  The symbol is exported as
@@GLIBC_2.11 symbol, F11 has only glibc 2.10.  If we add a single
GLIBC_2.11 symbol, we'd have to add them all, which means at least wait
until glibc 2.11 is released (in 4-5 months approximately).

-Eric

_______________________________________________
xfs mailing list
xfs@oss.sgi.com
http://oss.sgi.com/mailman/listinfo/xfs

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

end of thread, other threads:[~2009-06-16 15:04 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-06-15 19:43 xfs_io: fix test for fallocate on 32bit boxes Eric Sandeen
2009-06-15 20:12 ` Olaf Weber
2009-06-16 14:04 ` Christoph Hellwig
2009-06-16 15:04   ` Eric Sandeen

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