Skip to contentSkip to conversation

xfs_io: fix test for fallocate on 32bit boxes

PATCH Eric Sandeen 3 participants 4 messages Jun 15, 2009 – Jun 16, 2009

lore
Share & tools
lore
#0 lore raw

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.

---

m4/package_libcdev.m4 +3 -0
index 1ac4666..1c1859d 100644
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Reviewed-by
#1 lore raw

Looks good.

Quoted 31 lines · Eric Sandeen

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.

---

m4/package_libcdev.m4 +3 -0
index 1ac4666..1c1859d 100644
@@ -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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

Signature · 9 lines
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:  [email protected]

_______________________________________________
xfs mailing list
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs
#2 lore raw
In reply to Eric Sandeen
Quoted 8 lines · Eric Sandeen

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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs

#3 lore raw
Quoted 10 lines · Christoph Hellwig
Quoted 8 lines · Eric Sandeen

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.

Quoted 6 lines

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 ([email protected]) 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
[email protected]
http://oss.sgi.com/mailman/listinfo/xfs