--- /dev/null
+--- accelio-1.6/examples/raio/usr/fio/libraio.c.orig 2016-03-28 14:58:45.000000000 +0200
++++ accelio-1.6/examples/raio/usr/fio/libraio.c 2016-04-10 19:16:54.244086124 +0200
+@@ -130,7 +130,7 @@
+ unsigned int max, const struct timespec *t)
+ {
+ struct libraio_data *ld = td->io_ops->data;
+- unsigned actual_min = td->o.iodepth_batch_complete == 0 ? 0 : min;
++ unsigned actual_min = td->o.iodepth_batch_complete_min == 0 ? 0 : min;
+ int r, events = 0;
+
+ do {
+--- accelio-1.6/examples/raio/usr/fio/Makefile.am.orig 2016-03-28 14:58:45.000000000 +0200
++++ accelio-1.6/examples/raio/usr/fio/Makefile.am 2016-04-10 21:54:08.050356893 +0200
+@@ -30,6 +30,7 @@
+ # list of sources for the 'libraio_fio' shared library\r
+ libraio_fio_la_SOURCES = libraio.c\r
+ \r
++libraio_fio_la_LDFLAGS = -module -avoid-version
+ libraio_fio_la_LIBADD = -lraio -lxio $(libxio_rdma_ldflags) -lrt -ldl -lpthread \\r
+ -L$(top_builddir)/src/usr/ -L$(top_builddir)/examples/raio/\r
+ \r
--- /dev/null
+"SPINLOCK_NG" is x86-specific;
+also, use __builtin_ia32_pause directly, as _mm_pause used to be inside target("sse") pragma until gcc 5.?
+--- accelio-1.6/src/usr/linux/kernel.h.orig 2016-03-28 14:58:45.000000000 +0200
++++ accelio-1.6/src/usr/linux/kernel.h 2016-04-10 21:34:41.710405838 +0200
+@@ -89,7 +89,9 @@
+
+ typedef volatile int spinlock_t;
+
++#if defined(__i386__) || defined(__x86_64__)
+ #define SPINLOCK_NG
++#endif
+
+ #ifndef SPINLOCK_NG
+
+@@ -146,7 +148,7 @@
+ {
+ while (__sync_lock_test_and_set(spinlock, 1))
+ while (*spinlock)
+- _mm_pause();
++ __builtin_ia32_pause();
+ }
+
+ static inline int spin_try_lock(spinlock_t* spinlock)
# TODO:
-# - fio engine module (BR: headers from fio sources)
# - kernel modules (BR: OFED kernel headers)
#
# Conditional build:
-%bcond_with fio # FIO module
+%bcond_without fio # FIO module
%bcond_with kernel # kernel modules
%bcond_without static_libs # static libraries
#
Summary: Open Source I/O, Message and RPC Acceleration library
Summary(pl.UTF-8): Mająca otwarte źródła biblioteka przyspieszająca we/wy, komunikaty i RPC
Name: accelio
-Version: 1.3
+Version: 1.6
Release: 1
License: BSD
Group: Libraries
Source0: https://github.com/accelio/accelio/archive/v%{version}/%{name}-%{version}.tar.gz
-# Source0-md5: 3a75f4139c72a797740a50e8033f74ae
+# Source0-md5: 0f6634e03ff1bf2e9b83e554202d093f
+Patch0: %{name}-fio.patch
+Patch1: %{name}-sse.patch
URL: http://www.accelio.org/
BuildRequires: autoconf >= 2.50
BuildRequires: automake >= 1:1.11
+%{?with_fio:BuildRequires: fio-devel >= 2.8}
BuildRequires: libaio-devel
BuildRequires: libevent-devel >= 2
BuildRequires: libibverbs-devel
%prep
%setup -q
+%patch0 -p1
+%patch1 -p1
%{__sed} -i -e 's/-Werror //' configure.ac
%{__aclocal}
%{__autoconf}
%{__automake}
-for d in src/kernel/xio src/kernel/rdma src/kernel/tcp examples/kernel/hello_world examples/kernel/hello_world_mt tests/kernel/hello_test ; do
+for d in src/kernel/xio examples/kernel/hello_world examples/kernel/hello_world_mt tests/kernel/hello_test examples/raio/kernel/nbdx ; do
cd $d
%{__autoconf}
cd -
done
%configure \
+ %{?with_fio:FIO_ROOT=%{_includedir}/fio} \
--disable-silent-rules \
%{!?with_static_libs:--disable-static} \
%{?with_fio:--enable-fio-build} \
%{__make} install \
DESTDIR=$RPM_BUILD_ROOT
+# fio module, .la is useless
+%{__rm} $RPM_BUILD_ROOT%{_libdir}/libraio_fio.la
+# test program
+%{__rm} $RPM_BUILD_ROOT%{_bindir}/event_loop_tests
+
%clean
rm -rf $RPM_BUILD_ROOT
%attr(755,root,root) %{_bindir}/xiosrvd
%attr(755,root,root) %{_libdir}/libraio.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libraio.so.0
+%if %{with fio}
+%attr(755,root,root) %{_libdir}/libraio_fio.so
+%endif
%attr(755,root,root) %{_libdir}/libxio.so.*.*.*
%attr(755,root,root) %ghost %{_libdir}/libxio.so.0