Skip to contentSkip to conversation

fio: fix missing fallocate64()

PATCH New Frank Bergmann 2 participants 5 messages May 9, 2014 – May 19, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 fio: fix missing fallocate64()

Current nios2 toolchain is missing the falloacte64() function call. The configure script does not detect this correctly and the C library is swapping fallocate with fallocate64 while compiling with the LARGEFILE* flags.

The patch disables fallocate in the configure script.

Fixes http://autobuild.buildroot.net/results/9cd30031a40f768f6090cfba44c880fb2406672b

---
 .../fio-0001-nios2-configure-disable-fallocate.patch   | 18 ++++++++++++++++++
 package/fio/fio.mk                                     |  4 ++++
 2 files changed, 22 insertions(+)
 create mode 100644 board/common-nios2/fio/fio-0001-nios2-configure-disable-fallocate.patch
board/common-nios2/fio/fio-0001-nios2-configure-disable-fallocate.patch new file +18 -0
new file mode 100644
index 0000000..97b8b63
@@ -0,0 +1,18 @@
+configure: Disable fallocate
+
+Signed-off-by: Frank Bergmann <[email protected]>
+
+--- fio-fio-2.1.4.orig/configure	2013-11-16 19:15:12.000000000 +0100
++++ fio-fio-2.1.4/configure	2014-05-09 20:06:35.000000000 +0200
+@@ -578,7 +578,10 @@ int main(int argc, char **argv)
+ }
+ EOF
+ if compile_prog "" "" "linux_fallocate"; then
+-    linux_fallocate="yes"
++    # For nios2 disable fallocate because with LARGE_FILE flags it
++    # becomes fallocate64 which isn't available
++    #linux_fallocate="yes"
++    linux_fallocate="no"
+ fi
+ echo "Linux fallocate               $linux_fallocate"
+ 
package/fio/fio.mk +4 -0
index f9a690e..311779b 100644
@@ -9,6 +9,10 @@ FIO_SITE = git://git.kernel.dk/fio.git
 FIO_LICENSE = GPLv2 + special obligations
 FIO_LICENSE_FILES = LICENSE
 
+ifeq ($(BR2_nios2),y)
+BR2_GLOBAL_PATCH_DIR += "board/common-nios2"
+endif
+
 define FIO_CONFIGURE_CMDS
 	(cd $(@D); ./configure --cc="$(TARGET_CC)" --extra-cflags="$(TARGET_CFLAGS)")
 endef
Signature · 1 line
1.9.1
#1 lore raw

PATCH 1/1 fio: fix missing fallocate64()

Dear Frank Bergmann,

package/fio/fio.mk FIO_SITE = git://git.kernel.dk/fio.git · line 14

Quoted 3 lines · Frank Bergmann
package/fio/fio.mk +3 -0
+ifeq ($(BR2_nios2),y)
+BR2_GLOBAL_PATCH_DIR += "board/common-nios2"
+endif

Unfortunately, we don't want to have architecture-specific patches, and not applied with this mechanism.

I believe the easiest solution is just to make the fio package not available on NIOS II.

Thanks,

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#2 lore raw

PATCH 1/1 fio: fix missing fallocate64()

Dear Thomas Petazzoni,

Quoted 10 lines · Thomas Petazzoni

Dear Frank Bergmann,

package/fio/fio.mk FIO_SITE = git://git.kernel.dk/fio.git · line 14

Quoted 3 lines · Frank Bergmann
package/fio/fio.mk +3 -0
+ifeq ($(BR2_nios2),y)
+BR2_GLOBAL_PATCH_DIR += "board/common-nios2"
+endif

Unfortunately, we don't want to have architecture-specific patches, and not applied with this mechanism.

Sorry I didn't take notice of that.
Maybe someone could edit chapter 3.4.4 "Customizing packages"
(http://buildroot.org/downloads/manual/manual.html#packages-custom)
where such architecture-specific patches are mentioned to avoid misinterpreting it like I did.

With regards,
Frank Bergmann.

#3 lore raw

PATCH 1/1 fio: fix missing fallocate64()

Dear Frank Bergmann,

Quoted 12 lines · Frank Bergmann
Quoted 10 lines · Thomas Petazzoni

Dear Frank Bergmann,

package/fio/fio.mk FIO_SITE = git://git.kernel.dk/fio.git · line 14

Quoted 3 lines · Frank Bergmann
package/fio/fio.mk +3 -0
+ifeq ($(BR2_nios2),y)
+BR2_GLOBAL_PATCH_DIR += "board/common-nios2"
+endif

Unfortunately, we don't want to have architecture-specific patches, and not applied with this mechanism.

Quoted 5 lines

Sorry I didn't take notice of that.
Maybe someone could edit chapter 3.4.4 "Customizing packages"
(http://buildroot.org/downloads/manual/manual.html#packages-custom)
where such architecture-specific patches are mentioned to avoid misinterpreting it like I did.

I don't think chapter 3.4.4 is wrong, but the BR2_GLOBAL_PATCH_DIR is not meant to be used by Buildroot upstream itself. It's a way for Buildroot *users* to apply their own custom patches on top of the various packages that Buildroot has.

Thomas

Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
#4 lore raw

PATCH 1/1 fio: fix missing fallocate64()

Quoted 22 lines · Thomas Petazzoni

Dear Frank Bergmann,

Quoted 12 lines · Frank Bergmann
Quoted 10 lines · Thomas Petazzoni

Dear Frank Bergmann,

package/fio/fio.mk FIO_SITE = git://git.kernel.dk/fio.git · line 14

Quoted 3 lines · Frank Bergmann
package/fio/fio.mk +3 -0
+ifeq ($(BR2_nios2),y)
+BR2_GLOBAL_PATCH_DIR += "board/common-nios2"
+endif

Unfortunately, we don't want to have architecture-specific patches, and not applied with this mechanism.

Quoted 5 lines

Sorry I didn't take notice of that.
Maybe someone could edit chapter 3.4.4 "Customizing packages"
(http://buildroot.org/downloads/manual/manual.html#packages-custom)
where such architecture-specific patches are mentioned to avoid misinterpreting it like I did.

Quoted 4 lines

I don't think chapter 3.4.4 is wrong, but the BR2_GLOBAL_PATCH_DIR is not meant to be used by Buildroot upstream itself. It's a way for Buildroot *users* to apply their own custom patches on top of the various packages that Buildroot has.

Ah, I understand now. Thanks for the explanation !

Regards,
Frank Bergmann.