[packages/zfs] - fix building with linux 4.0 - rel 8

baggins baggins at pld-linux.org
Sun Apr 19 14:21:17 CEST 2015


commit 4be71d8bf632f8ec056a933a6af6d43737e5e876
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Sun Apr 19 14:20:58 2015 +0200

    - fix building with linux 4.0
    - rel 8

 linux-4.0.patch | 38 ++++++++++++++++++++++++++++++++++++++
 zfs.spec        |  4 +++-
 2 files changed, 41 insertions(+), 1 deletion(-)
---
diff --git a/zfs.spec b/zfs.spec
index 275cafd..5f5d29d 100644
--- a/zfs.spec
+++ b/zfs.spec
@@ -22,7 +22,7 @@ exit 1
 %define		_duplicate_files_terminate_build	0
 
 %define	pname	zfs
-%define	rel	7
+%define	rel	8
 Summary:	Native Linux port of the ZFS filesystem
 Summary(pl.UTF-8):	Natywny linuksowy port systemu plików ZFS
 Name:		%{pname}%{?_pld_builder:%{?with_kernel:-kernel}}%{_alt_kernel}
@@ -36,6 +36,7 @@ Patch0:		%{pname}-link.patch
 Patch1:		linux-3.18.patch
 Patch2:		x32.patch
 Patch3:		linux-3.19.patch
+Patch4:		linux-4.0.patch
 URL:		http://zfsonlinux.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -217,6 +218,7 @@ p=`pwd`\
 %patch1 -p1
 %patch2 -p1
 %patch3 -p1
+%patch4 -p1
 
 %build
 %{__libtoolize}
diff --git a/linux-4.0.patch b/linux-4.0.patch
new file mode 100644
index 0000000..ed5965a
--- /dev/null
+++ b/linux-4.0.patch
@@ -0,0 +1,38 @@
+--- zfs-0.6.3/config/kernel-bdi-setup-and-register.m4.orig	2014-06-12 22:58:09.000000000 +0200
++++ zfs-0.6.3/config/kernel-bdi-setup-and-register.m4	2015-04-19 14:12:52.429710415 +0200
+@@ -9,8 +9,13 @@
+ 	[AC_MSG_CHECKING([whether bdi_setup_and_register() is available])
+ 	ZFS_LINUX_TRY_COMPILE_SYMBOL([
+ 		#include <linux/backing-dev.h>
++		#include <linux/version.h>
+ 	], [
++		#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
++		int r = bdi_setup_and_register(NULL, NULL);
++		#else
+ 		int r = bdi_setup_and_register(NULL, NULL, 0);
++		#endif
+ 		r = *(&r);
+ 	], [bdi_setup_and_register], [mm/backing-dev.c], [
+ 		AC_MSG_RESULT(yes)
+--- zfs-0.6.3/module/zfs/zfs_vfsops.c~	2014-06-12 22:58:09.000000000 +0200
++++ zfs-0.6.3/module/zfs/zfs_vfsops.c	2015-04-19 14:14:13.503040887 +0200
+@@ -67,6 +67,7 @@
+ #include <sys/spa_boot.h>
+ #include <sys/zpl.h>
+ #include "zfs_comutil.h"
++#include "linux/version.h"
+ 
+ 
+ /*ARGSUSED*/
+@@ -1241,7 +1241,11 @@
+ 	zsb->z_bdi.ra_pages = 0;
+ 	sb->s_bdi = &zsb->z_bdi;
+ 
++#if LINUX_VERSION_CODE >= KERNEL_VERSION(4,0,0)
++	error = -bdi_setup_and_register(&zsb->z_bdi, "zfs");
++#else
+ 	error = -bdi_setup_and_register(&zsb->z_bdi, "zfs", BDI_CAP_MAP_COPY);
++#endif
+ 	if (error)
+ 		goto out;
+ #endif /* HAVE_BDI */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zfs.git/commitdiff/4be71d8bf632f8ec056a933a6af6d43737e5e876



More information about the pld-cvs-commit mailing list