[packages/zfs] - fix kernel module build when CONFIG_HIGHMEM is enabled

baggins baggins at pld-linux.org
Wed May 8 09:26:38 CEST 2019


commit 280c4fca4a2c145704b797d82e7a93945ef48b56
Author: Jan Rękorajski <baggins at pld-linux.org>
Date:   Wed May 8 09:26:08 2019 +0200

    - fix kernel module build when CONFIG_HIGHMEM is enabled

 highmem.patch | 24 ++++++++++++++++++++++++
 zfs.spec      |  2 ++
 2 files changed, 26 insertions(+)
---
diff --git a/zfs.spec b/zfs.spec
index 7760217..53b595e 100644
--- a/zfs.spec
+++ b/zfs.spec
@@ -43,6 +43,7 @@ Source0:	https://github.com/zfsonlinux/zfs/archive/zfs-%{version}-%{_rc}/%{pname
 # Source0-md5:	9630df590251ad13a347b10fd46c0922
 Patch0:		x32.patch
 Patch1:		am.patch
+Patch2:		highmem.patch
 URL:		http://zfsonlinux.org/
 BuildRequires:	autoconf >= 2.50
 BuildRequires:	automake
@@ -256,6 +257,7 @@ p=`pwd`\
 %setup -q -n %{pname}-zfs-%{version}-%{_rc}
 %patch0 -p1
 %patch1 -p1
+%patch2 -p1
 
 %build
 %{__libtoolize}
diff --git a/highmem.patch b/highmem.patch
new file mode 100644
index 0000000..9082274
--- /dev/null
+++ b/highmem.patch
@@ -0,0 +1,24 @@
+--- zfs-zfs-0.8.0-rc4/include/spl/sys/vmsystm.h~	2019-04-16 22:24:49.000000000 +0200
++++ zfs-zfs-0.8.0-rc4/include/spl/sys/vmsystm.h	2019-05-08 09:23:11.033988914 +0200
+@@ -35,8 +35,10 @@
+ 
+ #ifdef HAVE_TOTALRAM_PAGES_FUNC
+ #define	zfs_totalram_pages	totalram_pages()
++#define	zfs_totalhigh_pages	totalhigh_pages()
+ #else
+ #define	zfs_totalram_pages	totalram_pages
++#define	zfs_totalhigh_pages	totalhigh_pages
+ #endif
+ 
+ #define	membar_producer()		smp_wmb()
+--- zfs-zfs-0.8.0-rc4/module/zfs/arc.c~	2019-04-16 22:24:49.000000000 +0200
++++ zfs-zfs-0.8.0-rc4/module/zfs/arc.c	2019-05-08 09:23:53.410611854 +0200
+@@ -4828,7 +4828,7 @@
+ {
+ #ifdef _KERNEL
+ #ifdef CONFIG_HIGHMEM
+-	return (ptob(zfs_totalram_pages - totalhigh_pages));
++	return (ptob(zfs_totalram_pages - zfs_totalhigh_pages));
+ #else
+ 	return (ptob(zfs_totalram_pages));
+ #endif /* CONFIG_HIGHMEM */
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/zfs.git/commitdiff/280c4fca4a2c145704b797d82e7a93945ef48b56



More information about the pld-cvs-commit mailing list