New upstream version
Also fix gcc10 FTBFS and upstream build breakage in v3.18
This commit is contained in:
parent
ad85dfc2be
commit
3e758d8573
|
@ -18,3 +18,4 @@
|
||||||
/fio-3.15.tar.bz2
|
/fio-3.15.tar.bz2
|
||||||
/fio-3.16.tar.bz2
|
/fio-3.16.tar.bz2
|
||||||
/fio-3.17.tar.bz2
|
/fio-3.17.tar.bz2
|
||||||
|
/fio-3.18.tar.bz2
|
||||||
|
|
13
fio.spec
13
fio.spec
|
@ -1,6 +1,6 @@
|
||||||
Name: fio
|
Name: fio
|
||||||
Version: 3.17
|
Version: 3.18
|
||||||
Release: 2%{?dist}
|
Release: 1%{?dist}
|
||||||
Summary: Multithreaded IO generation tool
|
Summary: Multithreaded IO generation tool
|
||||||
|
|
||||||
License: GPLv2
|
License: GPLv2
|
||||||
|
@ -26,6 +26,9 @@ BuildRequires: numactl-devel
|
||||||
BuildRequires: librdmacm-devel
|
BuildRequires: librdmacm-devel
|
||||||
%endif
|
%endif
|
||||||
|
|
||||||
|
Patch0: fix-io_uring-build.patch
|
||||||
|
Patch1: fix-fio-globals.patch
|
||||||
|
|
||||||
%description
|
%description
|
||||||
fio is an I/O tool that will spawn a number of threads or processes doing
|
fio is an I/O tool that will spawn a number of threads or processes doing
|
||||||
a particular type of io action as specified by the user. fio takes a
|
a particular type of io action as specified by the user. fio takes a
|
||||||
|
@ -36,6 +39,8 @@ one wants to simulate.
|
||||||
|
|
||||||
%prep
|
%prep
|
||||||
%setup -q
|
%setup -q
|
||||||
|
%patch0 -p1
|
||||||
|
%patch1 -p1
|
||||||
|
|
||||||
pathfix.py -i %{__python3} -pn \
|
pathfix.py -i %{__python3} -pn \
|
||||||
tools/fio_jsonplus_clat2csv \
|
tools/fio_jsonplus_clat2csv \
|
||||||
|
@ -60,6 +65,10 @@ make install prefix=%{_prefix} mandir=%{_mandir} DESTDIR=$RPM_BUILD_ROOT INSTALL
|
||||||
%{_datadir}/%{name}/*
|
%{_datadir}/%{name}/*
|
||||||
|
|
||||||
%changelog
|
%changelog
|
||||||
|
* Thu Feb 13 2020 Eric Sandeen <sandeen@redhat.com> 3.18-1
|
||||||
|
- New upstream version
|
||||||
|
- Fix gcc10 build
|
||||||
|
|
||||||
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.17-2
|
* Tue Jan 28 2020 Fedora Release Engineering <releng@fedoraproject.org> - 3.17-2
|
||||||
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
- Rebuilt for https://fedoraproject.org/wiki/Fedora_32_Mass_Rebuild
|
||||||
|
|
||||||
|
|
|
@ -0,0 +1,39 @@
|
||||||
|
[PATCH] fio: remove duplicate global definition of tsc_reliable
|
||||||
|
|
||||||
|
From: Eric Sandeen <sandeen@redhat.com>
|
||||||
|
|
||||||
|
Newer gcc v10 complains about globals being defined twice due to
|
||||||
|
a new default -fno-common flag. This causes build failures:
|
||||||
|
|
||||||
|
LINK t/fio-dedupe
|
||||||
|
/usr/bin/ld: t/arch.o:(.bss+0x4): multiple definition of `tsc_reliable'; gettime.o:(.bss+0x4): first defined here
|
||||||
|
collect2: error: ld returned 1 exit status
|
||||||
|
make: *** [Makefile:499: t/fio-dedupe] Error 1
|
||||||
|
|
||||||
|
Each of the tests which call arch_init() to initialize tsc_reliable:
|
||||||
|
|
||||||
|
File Function Line
|
||||||
|
1 t/dedupe.c main 536 arch_init(argv);
|
||||||
|
2 t/lfsr-test.c main 37 arch_init(argv);
|
||||||
|
3 t/stest.c main 86 arch_init(argv);
|
||||||
|
|
||||||
|
already link with gettime.o which defines tsc_reliable,
|
||||||
|
so there is no need to provide it from t/arch.c
|
||||||
|
|
||||||
|
Signed-off-by: Eric Sandeen <sandeen@redhat.com>
|
||||||
|
---
|
||||||
|
|
||||||
|
I can't really tell if this is the right fix across all arches, but
|
||||||
|
maybe someone smarter than me can sort it out?
|
||||||
|
|
||||||
|
diff --git a/t/arch.c b/t/arch.c
|
||||||
|
index bd28a848..a72cef3a 100644
|
||||||
|
--- a/t/arch.c
|
||||||
|
+++ b/t/arch.c
|
||||||
|
@@ -1,5 +1,4 @@
|
||||||
|
#include "../arch/arch.h"
|
||||||
|
|
||||||
|
unsigned long arch_flags = 0;
|
||||||
|
-bool tsc_reliable;
|
||||||
|
int arch_random;
|
||||||
|
|
|
@ -0,0 +1,207 @@
|
||||||
|
|
||||||
|
|
||||||
|
commit bfed648c9dae6a2459cb43f55c14d8303dcec07b
|
||||||
|
Author: Jens Axboe <axboe@kernel.dk>
|
||||||
|
Date: Thu Feb 6 07:59:00 2020 -0700
|
||||||
|
|
||||||
|
Unify architecture io_uring syscall numbers
|
||||||
|
|
||||||
|
Only Alpha is the odd one out, apart from that all architectures use
|
||||||
|
the same system call number. So pull the code out arch headers, and
|
||||||
|
into the generic arch header.
|
||||||
|
|
||||||
|
Fixes: https://github.com/axboe/fio/issues/923
|
||||||
|
Signed-off-by: Jens Axboe <axboe@kernel.dk>
|
||||||
|
|
||||||
|
diff --git a/arch/arch-aarch64.h b/arch/arch-aarch64.h
|
||||||
|
index de9b349..2a86cc5 100644
|
||||||
|
--- a/arch/arch-aarch64.h
|
||||||
|
+++ b/arch/arch-aarch64.h
|
||||||
|
@@ -8,18 +8,6 @@
|
||||||
|
|
||||||
|
#define FIO_ARCH (arch_aarch64)
|
||||||
|
|
||||||
|
-#define ARCH_HAVE_IOURING
|
||||||
|
-
|
||||||
|
-#ifndef __NR_sys_io_uring_setup
|
||||||
|
-#define __NR_sys_io_uring_setup 425
|
||||||
|
-#endif
|
||||||
|
-#ifndef __NR_sys_io_uring_enter
|
||||||
|
-#define __NR_sys_io_uring_enter 426
|
||||||
|
-#endif
|
||||||
|
-#ifndef __NR_sys_io_uring_register
|
||||||
|
-#define __NR_sys_io_uring_register 427
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
#define nop do { __asm__ __volatile__ ("yield"); } while (0)
|
||||||
|
#define read_barrier() do { __sync_synchronize(); } while (0)
|
||||||
|
#define write_barrier() do { __sync_synchronize(); } while (0)
|
||||||
|
diff --git a/arch/arch-ppc.h b/arch/arch-ppc.h
|
||||||
|
index 46246ba..804d596 100644
|
||||||
|
--- a/arch/arch-ppc.h
|
||||||
|
+++ b/arch/arch-ppc.h
|
||||||
|
@@ -24,18 +24,6 @@
|
||||||
|
#define PPC_CNTLZL "cntlzw"
|
||||||
|
#endif
|
||||||
|
|
||||||
|
-#define ARCH_HAVE_IOURING
|
||||||
|
-
|
||||||
|
-#ifndef __NR_sys_io_uring_setup
|
||||||
|
-#define __NR_sys_io_uring_setup 425
|
||||||
|
-#endif
|
||||||
|
-#ifndef __NR_sys_io_uring_enter
|
||||||
|
-#define __NR_sys_io_uring_enter 426
|
||||||
|
-#endif
|
||||||
|
-#ifndef __NR_sys_io_uring_register
|
||||||
|
-#define __NR_sys_io_uring_register 427
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
static inline int __ilog2(unsigned long bitmask)
|
||||||
|
{
|
||||||
|
int lz;
|
||||||
|
diff --git a/arch/arch-x86-common.h b/arch/arch-x86-common.h
|
||||||
|
index 87925bd..f32835c 100644
|
||||||
|
--- a/arch/arch-x86-common.h
|
||||||
|
+++ b/arch/arch-x86-common.h
|
||||||
|
@@ -3,16 +3,6 @@
|
||||||
|
|
||||||
|
#include <string.h>
|
||||||
|
|
||||||
|
-#ifndef __NR_sys_io_uring_setup
|
||||||
|
-#define __NR_sys_io_uring_setup 425
|
||||||
|
-#endif
|
||||||
|
-#ifndef __NR_sys_io_uring_enter
|
||||||
|
-#define __NR_sys_io_uring_enter 426
|
||||||
|
-#endif
|
||||||
|
-#ifndef __NR_sys_io_uring_register
|
||||||
|
-#define __NR_sys_io_uring_register 427
|
||||||
|
-#endif
|
||||||
|
-
|
||||||
|
static inline void cpuid(unsigned int op,
|
||||||
|
unsigned int *eax, unsigned int *ebx,
|
||||||
|
unsigned int *ecx, unsigned int *edx)
|
||||||
|
@@ -23,7 +13,6 @@ static inline void cpuid(unsigned int op,
|
||||||
|
}
|
||||||
|
|
||||||
|
#define ARCH_HAVE_INIT
|
||||||
|
-#define ARCH_HAVE_IOURING
|
||||||
|
|
||||||
|
extern bool tsc_reliable;
|
||||||
|
extern int arch_random;
|
||||||
|
diff --git a/arch/arch.h b/arch/arch.h
|
||||||
|
index 0ec3f10..30c0d20 100644
|
||||||
|
--- a/arch/arch.h
|
||||||
|
+++ b/arch/arch.h
|
||||||
|
@@ -76,4 +76,32 @@ static inline int arch_init(char *envp[])
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
|
||||||
|
+#ifdef __alpha__
|
||||||
|
+/*
|
||||||
|
+ * alpha is the only exception, all other architectures
|
||||||
|
+ * have common numbers for new system calls.
|
||||||
|
+ */
|
||||||
|
+# ifndef __NR_io_uring_setup
|
||||||
|
+# define __NR_io_uring_setup 535
|
||||||
|
+# endif
|
||||||
|
+# ifndef __NR_io_uring_enter
|
||||||
|
+# define __NR_io_uring_enter 536
|
||||||
|
+# endif
|
||||||
|
+# ifndef __NR_io_uring_register
|
||||||
|
+# define __NR_io_uring_register 537
|
||||||
|
+# endif
|
||||||
|
+#else /* !__alpha__ */
|
||||||
|
+# ifndef __NR_io_uring_setup
|
||||||
|
+# define __NR_io_uring_setup 425
|
||||||
|
+# endif
|
||||||
|
+# ifndef __NR_io_uring_enter
|
||||||
|
+# define __NR_io_uring_enter 426
|
||||||
|
+# endif
|
||||||
|
+# ifndef __NR_io_uring_register
|
||||||
|
+# define __NR_io_uring_register 427
|
||||||
|
+# endif
|
||||||
|
+#endif
|
||||||
|
+
|
||||||
|
+#define ARCH_HAVE_IOURING
|
||||||
|
+
|
||||||
|
#endif
|
||||||
|
diff --git a/engines/io_uring.c b/engines/io_uring.c
|
||||||
|
index f1ffc71..5e59f97 100644
|
||||||
|
--- a/engines/io_uring.c
|
||||||
|
+++ b/engines/io_uring.c
|
||||||
|
@@ -191,7 +191,7 @@ static struct fio_option options[] = {
|
||||||
|
static int io_uring_enter(struct ioring_data *ld, unsigned int to_submit,
|
||||||
|
unsigned int min_complete, unsigned int flags)
|
||||||
|
{
|
||||||
|
- return syscall(__NR_sys_io_uring_enter, ld->ring_fd, to_submit,
|
||||||
|
+ return syscall(__NR_io_uring_enter, ld->ring_fd, to_submit,
|
||||||
|
min_complete, flags, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -548,7 +548,7 @@ static int fio_ioring_queue_init(struct thread_data *td)
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
- ret = syscall(__NR_sys_io_uring_setup, depth, &p);
|
||||||
|
+ ret = syscall(__NR_io_uring_setup, depth, &p);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
|
||||||
|
@@ -563,7 +563,7 @@ static int fio_ioring_queue_init(struct thread_data *td)
|
||||||
|
if (setrlimit(RLIMIT_MEMLOCK, &rlim) < 0)
|
||||||
|
return -1;
|
||||||
|
|
||||||
|
- ret = syscall(__NR_sys_io_uring_register, ld->ring_fd,
|
||||||
|
+ ret = syscall(__NR_io_uring_register, ld->ring_fd,
|
||||||
|
IORING_REGISTER_BUFFERS, ld->iovecs, depth);
|
||||||
|
if (ret < 0)
|
||||||
|
return ret;
|
||||||
|
@@ -589,7 +589,7 @@ static int fio_ioring_register_files(struct thread_data *td)
|
||||||
|
f->engine_pos = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
- ret = syscall(__NR_sys_io_uring_register, ld->ring_fd,
|
||||||
|
+ ret = syscall(__NR_io_uring_register, ld->ring_fd,
|
||||||
|
IORING_REGISTER_FILES, ld->fds, td->o.nr_files);
|
||||||
|
if (ret) {
|
||||||
|
err:
|
||||||
|
diff --git a/t/io_uring.c b/t/io_uring.c
|
||||||
|
index c2e5e09..55b75f6 100644
|
||||||
|
--- a/t/io_uring.c
|
||||||
|
+++ b/t/io_uring.c
|
||||||
|
@@ -100,7 +100,7 @@ static int io_uring_register_buffers(struct submitter *s)
|
||||||
|
if (do_nop)
|
||||||
|
return 0;
|
||||||
|
|
||||||
|
- return syscall(__NR_sys_io_uring_register, s->ring_fd,
|
||||||
|
+ return syscall(__NR_io_uring_register, s->ring_fd,
|
||||||
|
IORING_REGISTER_BUFFERS, s->iovecs, depth);
|
||||||
|
}
|
||||||
|
|
||||||
|
@@ -117,20 +117,20 @@ static int io_uring_register_files(struct submitter *s)
|
||||||
|
s->files[i].fixed_fd = i;
|
||||||
|
}
|
||||||
|
|
||||||
|
- return syscall(__NR_sys_io_uring_register, s->ring_fd,
|
||||||
|
+ return syscall(__NR_io_uring_register, s->ring_fd,
|
||||||
|
IORING_REGISTER_FILES, s->fds, s->nr_files);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int io_uring_setup(unsigned entries, struct io_uring_params *p)
|
||||||
|
{
|
||||||
|
- return syscall(__NR_sys_io_uring_setup, entries, p);
|
||||||
|
+ return syscall(__NR_io_uring_setup, entries, p);
|
||||||
|
}
|
||||||
|
|
||||||
|
static int io_uring_enter(struct submitter *s, unsigned int to_submit,
|
||||||
|
unsigned int min_complete, unsigned int flags)
|
||||||
|
{
|
||||||
|
- return syscall(__NR_sys_io_uring_enter, s->ring_fd, to_submit,
|
||||||
|
- min_complete, flags, NULL, 0);
|
||||||
|
+ return syscall(__NR_io_uring_enter, s->ring_fd, to_submit, min_complete,
|
||||||
|
+ flags, NULL, 0);
|
||||||
|
}
|
||||||
|
|
||||||
|
#ifndef CONFIG_HAVE_GETTID
|
||||||
|
|
||||||
|
|
2
sources
2
sources
|
@ -1 +1 @@
|
||||||
SHA512 (fio-3.17.tar.bz2) = 27dba4c3e8f544c0fd40a5f42660f64f42e114e7b56199bc70f540b1a09b9dec9291e3fbae0fab9691189fa4a1f40edbcf4f9b53c313fd9c1a8ba0fdbb7f524e
|
SHA512 (fio-3.18.tar.bz2) = 11b689bfc873716bd3f06f46652facf7a1cf6928bc251d9b394fac4afb77497043dc3a083fe69a940cba26080eee5fd56ad5bfdf8d1c2dfd3d5d94414d7b5922
|
||||||
|
|
Loading…
Reference in New Issue