From 28c6b4f0d2f3fd9f55040fbe46f889e14bc06aec Mon Sep 17 00:00:00 2001 From: "zhixin.zhang" Date: Mon, 12 Dec 2022 13:48:02 +0800 Subject: [PATCH 1/2] Add sw patch --- fio.spec | 9 +++++-- sw_64.patch | 77 +++++++++++++++++++++++++++++++++++++++++++++++++++++ 2 files changed, 84 insertions(+), 2 deletions(-) create mode 100644 sw_64.patch diff --git a/fio.spec b/fio.spec index 617c699..37f0c77 100644 --- a/fio.spec +++ b/fio.spec @@ -1,10 +1,12 @@ Name: fio Version: 3.29 -Release: 1 +Release: 2 Summary: Versatile IO workload generator License: GPLv2 URL: http://git.kernel.dk/?p=fio.git;a=summary Source: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2 +Patch1: sw_64.patch + BuildRequires: libaio-devel python3-devel zlib-devel librbd1-devel numactl-devel librdmacm-devel gcc %ifarch x86_64 @@ -32,7 +34,7 @@ pathfix.py -i %{__python3} -pn \ t/steadystate_tests.py %build -./configure --disable-optimizations +./configure --disable-optimizations --disable-nfs export EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" %make_build V=1 @@ -50,6 +52,9 @@ export EXTFLAGS="$RPM_OPT_FLAGS" LDFLAGS="$RPM_LD_FLAGS" %{_mandir}/man1/* %changelog +* Mon Dec 12 2022 guojiancheng - 3.29-2 +- Add sw patch + * Fri Jan 14 2022 caodongxia - 3.29-1 - Upgrade 3.29 diff --git a/sw_64.patch b/sw_64.patch new file mode 100644 index 0000000..75772d2 --- /dev/null +++ b/sw_64.patch @@ -0,0 +1,77 @@ +diff -Naru fio-3.29/arch/arch.h fio-3.29-sw/arch/arch.h +--- fio-3.29/arch/arch.h 2021-12-18 14:09:32.000000000 +0000 ++++ fio-3.29-sw/arch/arch.h 2022-09-08 02:04:52.559532884 +0000 +@@ -23,6 +23,7 @@ + arch_hppa, + arch_mips, + arch_aarch64, ++ arch_sw_64, + + arch_generic, + +@@ -81,6 +82,8 @@ + #include "arch-ia64.h" + #elif defined(__alpha__) + #include "arch-alpha.h" ++#elif defined(__sw_64__) ++#include "arch-sw_64.h" + #elif defined(__s390x__) || defined(__s390__) + #include "arch-s390.h" + #elif defined(__sparc__) +@@ -112,7 +115,7 @@ + } + #endif + +-#ifdef __alpha__ ++#if defined(__alpha__) || defined(__sw_64__) + /* + * alpha is the only exception, all other architectures + * have common numbers for new system calls. +@@ -141,3 +144,5 @@ + #define ARCH_HAVE_IOURING + + #endif ++ ++ +diff -Naru fio-3.29/arch/arch-sw_64.h fio-3.29-sw/arch/arch-sw_64.h +--- fio-3.29/arch/arch-sw_64.h 1970-01-01 00:00:00.000000000 +0000 ++++ fio-3.29-sw/arch/arch-sw_64.h 2022-09-07 10:00:24.049532884 +0000 +@@ -0,0 +1,10 @@ ++#ifndef ARCH_SW_64_H ++#define ARCH_SW_64_H ++ ++#define FIO_ARCH (arch_sw_64) ++ ++#define nop do { } while (0) ++#define read_barrier() __asm__ __volatile__("memb": : :"memory") ++#define write_barrier() __asm__ __volatile__("memb": : :"memory") ++ ++#endif +diff -Naru fio-3.29/os/os-linux-syscall.h fio-3.29-sw/os/os-linux-syscall.h +--- fio-3.29/os/os-linux-syscall.h 2021-12-18 14:09:32.000000000 +0000 ++++ fio-3.29-sw/os/os-linux-syscall.h 2022-09-07 09:56:05.509532884 +0000 +@@ -116,6 +116,24 @@ + #define __NR_sys_vmsplice 471 + #endif + ++/* Linux syscalls for sw_64 */ ++#elif defined(ARCH_SW_64_H) ++#ifndef __NR_ioprio_set ++#define __NR_ioprio_set 442 ++#define __NR_ioprio_get 443 ++#endif ++ ++#ifndef __NR_fadvise64 ++#define __NR_fadvise64 413 ++#endif ++ ++#ifndef __NR_sys_splice ++#define __NR_sys_splice 468 ++#define __NR_sys_tee 470 ++#define __NR_sys_vmsplice 471 ++#endif ++ ++ + /* Linux syscalls for s390 */ + #elif defined(ARCH_S390_H) + #ifndef __NR_ioprio_set -- Gitee From 073029ee519e74f076af75b20b1f1228bc6e4777 Mon Sep 17 00:00:00 2001 From: "zhixin.zhang" Date: Mon, 26 Dec 2022 11:15:01 +0800 Subject: [PATCH 2/2] add sw patch --- fio.spec | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/fio.spec b/fio.spec index 37f0c77..c4c0a53 100644 --- a/fio.spec +++ b/fio.spec @@ -5,8 +5,9 @@ Summary: Versatile IO workload generator License: GPLv2 URL: http://git.kernel.dk/?p=fio.git;a=summary Source: http://brick.kernel.dk/snaps/%{name}-%{version}.tar.bz2 +%ifarch sw_64 Patch1: sw_64.patch - +%endif BuildRequires: libaio-devel python3-devel zlib-devel librbd1-devel numactl-devel librdmacm-devel gcc %ifarch x86_64 -- Gitee