[packages/spl] - fix building with linux 3.17 - rel 2

baggins baggins at pld-linux.org
Sun Nov 9 16:53:45 CET 2014


commit 74742be2be00fe7e12db4747d35cc8a9f5046a97
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Nov 9 16:53:30 2014 +0100

    - fix building with linux 3.17
    - rel 2

 linux-3.17.patch | 39 +++++++++++++++++++++++++++++++++++++++
 spl.spec         |  4 +++-
 2 files changed, 42 insertions(+), 1 deletion(-)
---
diff --git a/spl.spec b/spl.spec
index 4e2f794..ab3dab0 100644
--- a/spl.spec
+++ b/spl.spec
@@ -41,7 +41,7 @@ exit 1
 %define		bkpkg	%(echo %{_build_kernels} | tr , '\\n' | while read n ; do echo %%undefine alt_kernel ; [ -z "$n" ] || echo %%define alt_kernel $n ; echo %%build_kernel_pkg ; done)
 
 %define		pname	spl
-%define		rel	1
+%define		rel	2
 Summary:	Solaris Porting Layer
 Summary(pl.UTF-8):	Solaris Porting Layer - warstwa do portowania kodu z Solarisa
 Name:		%{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
@@ -51,6 +51,7 @@ License:	GPL v2+
 Group:		Applications/System
 Source0:	http://archive.zfsonlinux.org/downloads/zfsonlinux/spl/%{pname}-%{version}.tar.gz
 # Source0-md5:	8df6ce3c8f1d9af6526b36f5079cba59
+Patch0:		linux-3.17.patch
 URL:		http://zfsonlinux.org/
 BuildRequires:	rpmbuild(macros) >= 1.678
 %{?with_dist_kernel:%{expand:%kbrs}}
@@ -132,6 +133,7 @@ p=`pwd`\
 
 %prep
 %setup -q -n %{pname}-%{version}
+%patch0 -p1
 
 %build
 %{__aclocal} -I config
diff --git a/linux-3.17.patch b/linux-3.17.patch
new file mode 100644
index 0000000..a5de0e3
--- /dev/null
+++ b/linux-3.17.patch
@@ -0,0 +1,39 @@
+--- spl-0.6.3/module/spl/spl-kmem.c~	2014-06-12 22:59:01.000000000 +0200
++++ spl-0.6.3/module/spl/spl-kmem.c	2014-11-09 16:42:21.157985621 +0100
+@@ -26,6 +26,7 @@
+ 
+ #include <sys/kmem.h>
+ #include <spl-debug.h>
++#include <linux/version.h>
+ 
+ #ifdef SS_DEBUG_SUBSYS
+ #undef SS_DEBUG_SUBSYS
+@@ -1889,12 +1889,14 @@
+ 	return !test_bit(KMC_BIT_GROWING, &skc->skc_flags);
+ }
+ 
++#if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) )
+ static int
+ spl_cache_reclaim_wait(void *word)
+ {
+ 	schedule();
+ 	return 0;
+ }
++#endif
+ 
+ /*
+  * No available objects on any slabs, create a new slab.  Note that this
+@@ -1917,8 +1919,13 @@
+ 	 * then return so the local magazine can be rechecked for new objects.
+ 	 */
+ 	if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) {
++#if ( LINUX_VERSION_CODE < KERNEL_VERSION(3,17,0) )
+ 		rc = wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING,
+ 		    spl_cache_reclaim_wait, TASK_UNINTERRUPTIBLE);
++#else
++		rc = wait_on_bit_io(&skc->skc_flags, KMC_BIT_REAPING,
++		    TASK_UNINTERRUPTIBLE);
++#endif
+ 		SRETURN(rc ? rc : -EAGAIN);
+ 	}
+ 
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/spl.git/commitdiff/74742be2be00fe7e12db4747d35cc8a9f5046a97



More information about the pld-cvs-commit mailing list