git.iko.soy/typeable/nixpkgs
on master help sign in
spl: Update git
commita47b06459567a9251c21c20127f207807f02ac52 authorWilliam A. Kennington III <william@wkennington.com> dateFri 2 Jan 2015, 11:38 (12 years ago) parentab18f15
4 files changed+182−217
pkgs/os-specific/linux/spl/git.nix+9−8 pkgs/os-specific/linux/spl/install_prefix-git.patch+173 pkgs/os-specific/linux/spl/kernel-3.16.patch−34 pkgs/os-specific/linux/spl/kernel-3.17.patch−175
pkgs/os-specific/linux/spl/git.nix+9−8
@@ -1,14 +1,15 @@
11{ stdenv, fetchgit, kernel, perl, autoconf, automake, libtool, coreutils, gawk }:
22
33stdenv.mkDerivation {
4− name = "spl-0.6.3-${kernel.version}";
4+ name = "spl-0.6.4-${kernel.version}";
5+
56 src = fetchgit {
67 url = git://github.com/zfsonlinux/spl.git;
7− rev = "31cb5383bff0fddc5058973e32a6f2c446d45e59";
8− sha256 = "0mcivbddms8kbapbs9x6achqyvh5i6h1rd2b3jm8g5yjn0flc5gl";
8+ rev = "a3c1eb77721a0d511b4fe7111bb2314686570c4b";
9+ sha256 = "050qvaw45rxlfwm3dxlxw89p3d3hcnkls6k1s4anlzb4qz5x5ph9";
910 };
1011
11− patches = [ ./install_prefix.patch ./const.patch ./kernel-3.16.patch ./kernel-3.17.patch ];
12+ patches = [ ./const.patch ./install_prefix-git.patch ];
1213
1314 buildInputs = [ perl autoconf automake libtool ];
1415
@@ -23,10 +24,10 @@ stdenv.mkDerivation {
2324 substituteInPlace ./module/splat/splat-linux.c --replace "PATH=/sbin:/usr/sbin:/bin:/usr/bin" "PATH=${coreutils}:/bin"
2425 '';
2526
26− configureFlags = ''
27− --with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source
28− --with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build
29− '';
27+ configureFlags = [
28+ "--with-linux=${kernel.dev}/lib/modules/${kernel.modDirVersion}/source"
29+ "--with-linux-obj=${kernel.dev}/lib/modules/${kernel.modDirVersion}/build"
30+ ];
3031
3132 enableParallelBuilding = true;
3233
pkgs/os-specific/linux/spl/install_prefix-git.patchnew file+173
@@ -0,0 +1,173 @@
1+diff --git a/Makefile.am b/Makefile.am
2+index 89af931..674420c 100644
3+--- a/Makefile.am
4++++ b/Makefile.am
5+@@ -12,10 +12,10 @@ endif
6+ if CONFIG_KERNEL
7+ SUBDIRS += module
8+
9+-extradir = @prefix@/src/spl-$(VERSION)
10++extradir = @prefix@/libexec/spl
11+ extra_HEADERS = spl.release.in spl_config.h.in
12+
13+-kerneldir = @prefix@/src/spl-$(VERSION)/$(LINUX_VERSION)
14++kerneldir = @prefix@/libexec/spl/$(LINUX_VERSION)
15+ nodist_kernel_HEADERS = spl.release spl_config.h module/$(LINUX_SYMBOLS)
16+ endif
17+
18+diff --git a/include/Makefile.am b/include/Makefile.am
19+index 3200222..4a47aaa 100644
20+--- a/include/Makefile.am
21++++ b/include/Makefile.am
22+@@ -13,6 +13,6 @@ USER_H =
23+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
24+
25+ if CONFIG_KERNEL
26+-kerneldir = @prefix@/src/spl-$(VERSION)/include
27++kerneldir = @prefix@/libexec/spl/include
28+ kernel_HEADERS = $(KERNEL_H)
29+ endif
30+diff --git a/include/fs/Makefile.am b/include/fs/Makefile.am
31+index e0da4b3..d6d7af0 100644
32+--- a/include/fs/Makefile.am
33++++ b/include/fs/Makefile.am
34+@@ -8,6 +8,6 @@ USER_H =
35+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
36+
37+ if CONFIG_KERNEL
38+-kerneldir = @prefix@/src/spl-$(VERSION)/include/fs
39++kerneldir = @prefix@/libexec/spl/include/fs
40+ kernel_HEADERS = $(KERNEL_H)
41+ endif
42+diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
43+index 1cca44a..e0d843b 100644
44+--- a/include/linux/Makefile.am
45++++ b/include/linux/Makefile.am
46+@@ -19,6 +19,6 @@ USER_H =
47+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
48+
49+ if CONFIG_KERNEL
50+-kerneldir = @prefix@/src/spl-$(VERSION)/include/linux
51++kerneldir = @prefix@/libexec/spl/include/linux
52+ kernel_HEADERS = $(KERNEL_H)
53+ endif
54+diff --git a/include/rpc/Makefile.am b/include/rpc/Makefile.am
55+index cfc8246..4fbd33d 100644
56+--- a/include/rpc/Makefile.am
57++++ b/include/rpc/Makefile.am
58+@@ -9,6 +9,6 @@ USER_H =
59+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
60+
61+ if CONFIG_KERNEL
62+-kerneldir = @prefix@/src/spl-$(VERSION)/include/rpc
63++kerneldir = @prefix@/libexec/spl/include/rpc
64+ kernel_HEADERS = $(KERNEL_H)
65+ endif
66+diff --git a/include/sharefs/Makefile.am b/include/sharefs/Makefile.am
67+index 10e7093..febecdf 100644
68+--- a/include/sharefs/Makefile.am
69++++ b/include/sharefs/Makefile.am
70+@@ -8,6 +8,6 @@ USER_H =
71+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
72+
73+ if CONFIG_KERNEL
74+-kerneldir = @prefix@/src/spl-$(VERSION)/include/sharefs
75++kerneldir = @prefix@/libexec/spl/include/sharefs
76+ kernel_HEADERS = $(KERNEL_H)
77+ endif
78+diff --git a/include/sys/Makefile.am b/include/sys/Makefile.am
79+index 2d21c57..3958cfd 100644
80+--- a/include/sys/Makefile.am
81++++ b/include/sys/Makefile.am
82+@@ -104,7 +104,7 @@ USER_H =
83+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
84+
85+ if CONFIG_KERNEL
86+-kerneldir = @prefix@/src/spl-$(VERSION)/include/sys
87++kerneldir = @prefix@/libexec/spl/include/sys
88+ kernel_HEADERS = $(KERNEL_H)
89+ endif
90+
91+diff --git a/include/sys/fm/Makefile.am b/include/sys/fm/Makefile.am
92+index 2821cbe..a84ce8e 100644
93+--- a/include/sys/fm/Makefile.am
94++++ b/include/sys/fm/Makefile.am
95+@@ -9,6 +9,6 @@ USER_H =
96+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
97+
98+ if CONFIG_KERNEL
99+-kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fm
100++kerneldir = @prefix@/libexec/spl/include/sys/fm
101+ kernel_HEADERS = $(KERNEL_H)
102+ endif
103+diff --git a/include/sys/fs/Makefile.am b/include/sys/fs/Makefile.am
104+index 581083e..0c35fb7 100644
105+--- a/include/sys/fs/Makefile.am
106++++ b/include/sys/fs/Makefile.am
107+@@ -8,6 +8,6 @@ USER_H =
108+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
109+
110+ if CONFIG_KERNEL
111+-kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/fs
112++kerneldir = @prefix@/libexec/spl/include/sys/fs
113+ kernel_HEADERS = $(KERNEL_H)
114+ endif
115+diff --git a/include/sys/sysevent/Makefile.am b/include/sys/sysevent/Makefile.am
116+index 63d9af3..de1aa18 100644
117+--- a/include/sys/sysevent/Makefile.am
118++++ b/include/sys/sysevent/Makefile.am
119+@@ -8,6 +8,6 @@ USER_H =
120+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
121+
122+ if CONFIG_KERNEL
123+-kerneldir = @prefix@/src/spl-$(VERSION)/include/sys/sysevent
124++kerneldir = @prefix@/libexec/spl/include/sys/sysevent
125+ kernel_HEADERS = $(KERNEL_H)
126+ endif
127+diff --git a/include/util/Makefile.am b/include/util/Makefile.am
128+index b721b50..cbb9a05 100644
129+--- a/include/util/Makefile.am
130++++ b/include/util/Makefile.am
131+@@ -9,6 +9,6 @@ USER_H =
132+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
133+
134+ if CONFIG_KERNEL
135+-kerneldir = @prefix@/src/spl-$(VERSION)/include/util
136++kerneldir = @prefix@/libexec/spl/include/util
137+ kernel_HEADERS = $(KERNEL_H)
138+ endif
139+diff --git a/include/vm/Makefile.am b/include/vm/Makefile.am
140+index 7faab0a..8148b3d 100644
141+--- a/include/vm/Makefile.am
142++++ b/include/vm/Makefile.am
143+@@ -10,6 +10,6 @@ USER_H =
144+ EXTRA_DIST = $(COMMON_H) $(KERNEL_H) $(USER_H)
145+
146+ if CONFIG_KERNEL
147+-kerneldir = @prefix@/src/spl-$(VERSION)/include/vm
148++kerneldir = @prefix@/libexec/spl/include/vm
149+ kernel_HEADERS = $(KERNEL_H)
150+ endif
151+diff --git a/module/Makefile.in b/module/Makefile.in
152+index 41c1010..3141397 100644
153+--- a/module/Makefile.in
154++++ b/module/Makefile.in
155+@@ -21,15 +21,15 @@ clean:
156+ modules_install:
157+ @# Install the kernel modules
158+ $(MAKE) -C @LINUX_OBJ@ SUBDIRS=`pwd` $@ \
159+- INSTALL_MOD_PATH=$(DESTDIR)$(INSTALL_MOD_PATH) \
160++ INSTALL_MOD_PATH=@prefix@/$(INSTALL_MOD_PATH) \
161+ INSTALL_MOD_DIR=$(INSTALL_MOD_DIR) \
162+ KERNELRELEASE=@LINUX_VERSION@
163+ @# Remove extraneous build products when packaging
164+- kmoddir=$(DESTDIR)$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
165++ kmoddir=@prefix@/$(INSTALL_MOD_PATH)/lib/modules/@LINUX_VERSION@; \
166+ if [ -n $$kmoddir ]; then \
167+ find $$kmoddir -name 'modules.*' | xargs $(RM); \
168+ fi
169+- sysmap=$(DESTDIR)$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
170++ sysmap=@prefix@/$(INSTALL_MOD_PATH)/boot/System.map-@LINUX_VERSION@; \
171+ if [ -f $$sysmap ]; then \
172+ depmod -ae -F $$sysmap @LINUX_VERSION@; \
173+ fi
pkgs/os-specific/linux/spl/kernel-3.16.patchdeleted−34
@@ -1,34 +0,0 @@
1−From e3020723dc43af2bc22af0d68571a61daf9b44d0 Mon Sep 17 00:00:00 2001
2−From: Turbo Fredriksson <turbo@bayour.com>
3−Date: Sun, 14 Sep 2014 15:47:22 +0000
4−Subject: [PATCH] Linux 3.16 compat: smp_mb__after_clear_bit()
5−
6−The smp_mb__{before,after}_clear_bit functions have been renamed
7−smp_mb__{before,after}_atomic. Rather than adding a compatibility
8−function to handle this the code has been updated to use smp_wmb().
9−
10−This has the advantage of being a stable functionally equivalent
11−interface. On many architectures smp_mb__after_clear_bit() expands
12−to smp_wmb(). Others might be able to do something slightly more
13−efficient but this will be safe and correct on all of them.
14−
15−Signed-off-by: Turbo Fredriksson <turbo@bayour.com>
16−Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
17−Closes #386
18−---
19− module/spl/spl-kmem.c | 2 +-
20− 1 file changed, 1 insertion(+), 1 deletion(-)
21−
22−diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
23−index 6de513e..79954eb 100644
24−--- a/module/spl/spl-kmem.c
25−+++ b/module/spl/spl-kmem.c
26−@@ -2365,7 +2365,7 @@ spl_kmem_cache_reap_now(spl_kmem_cache_t *skc, int count)
27−
28− spl_slab_reclaim(skc, count, 1);
29− clear_bit(KMC_BIT_REAPING, &skc->skc_flags);
30−- smp_mb__after_clear_bit();
31−+ smp_wmb();
32− wake_up_bit(&skc->skc_flags, KMC_BIT_REAPING);
33− out:
34− atomic_dec(&skc->skc_ref);
pkgs/os-specific/linux/spl/kernel-3.17.patchdeleted−175
@@ -1,175 +0,0 @@
1−From 2fc44f66ec9b83069593d87cf311069458c0d5ae Mon Sep 17 00:00:00 2001
2−From: Ned Bass <bass6@llnl.gov>
3−Date: Fri, 8 Aug 2014 17:41:22 -0700
4−Subject: [PATCH] Linux 3.17 compat: remove wait_on_bit action function
5−
6−Linux kernel 3.17 removes the action function argument from
7−wait_on_bit(). Add autoconf test and compatibility macro to support
8−the new interface.
9−
10−The former "wait_on_bit" interface required an 'action' function to
11−be provided which does the actual waiting. There were over 20 such
12−functions in the kernel, many of them identical, though most cases
13−can be satisfied by one of just two functions: one which uses
14−io_schedule() and one which just uses schedule(). This API change
15−was made to consolidate all of those redundant wait functions.
16−
17−References: torvalds/linux@7431620
18−
19−Signed-off-by: Ned Bass <bass6@llnl.gov>
20−Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
21−Closes #378
22−---
23− config/spl-build.m4 | 26 ++++++++++++++++++++++++++
24− include/linux/Makefile.am | 1 +
25− include/linux/wait_compat.h | 45 +++++++++++++++++++++++++++++++++++++++++++++
26− include/sys/types.h | 1 +
27− module/spl/spl-kmem.c | 11 ++---------
28− 5 files changed, 75 insertions(+), 9 deletions(-)
29− create mode 100644 include/linux/wait_compat.h
30−
31−diff --git a/config/spl-build.m4 b/config/spl-build.m4
32−index eef5233..2514d8c 100644
33−--- a/config/spl-build.m4
34−+++ b/config/spl-build.m4
35−@@ -94,6 +94,7 @@ AC_DEFUN([SPL_AC_CONFIG_KERNEL], [
36− SPL_AC_2ARGS_VFS_GETATTR
37− SPL_AC_USLEEP_RANGE
38− SPL_AC_KMEM_CACHE_ALLOCFLAGS
39−+ SPL_AC_WAIT_ON_BIT
40− ])
41−
42− AC_DEFUN([SPL_AC_MODULE_SYMVERS], [
43−@@ -2570,3 +2571,28 @@ AC_DEFUN([SPL_AC_KMEM_CACHE_ALLOCFLAGS], [
44− ])
45− ])
46− ])
47−+
48−+dnl #
49−+dnl # 3.17 API change,
50−+dnl # wait_on_bit() no longer requires an action argument. The former
51−+dnl # "wait_on_bit" interface required an 'action' function to be provided
52−+dnl # which does the actual waiting. There were over 20 such functions in the
53−+dnl # kernel, many of them identical, though most cases can be satisfied by one
54−+dnl # of just two functions: one which uses io_schedule() and one which just
55−+dnl # uses schedule(). This API change was made to consolidate all of those
56−+dnl # redundant wait functions.
57−+dnl #
58−+AC_DEFUN([SPL_AC_WAIT_ON_BIT], [
59−+ AC_MSG_CHECKING([whether wait_on_bit() takes an action])
60−+ SPL_LINUX_TRY_COMPILE([
61−+ #include <linux/wait.h>
62−+ ],[
63−+ int (*action)(void *) = NULL;
64−+ wait_on_bit(NULL, 0, action, 0);
65−+ ],[
66−+ AC_MSG_RESULT(yes)
67−+ AC_DEFINE(HAVE_WAIT_ON_BIT_ACTION, 1, [yes])
68−+ ],[
69−+ AC_MSG_RESULT(no)
70−+ ])
71−+])
72−diff --git a/include/linux/Makefile.am b/include/linux/Makefile.am
73−index 59f2ec5..ec7023d 100644
74−--- a/include/linux/Makefile.am
75−+++ b/include/linux/Makefile.am
76−@@ -17,6 +17,7 @@ KERNEL_H = \
77− $(top_srcdir)/include/linux/sysctl_compat.h \
78− $(top_srcdir)/include/linux/time_compat.h \
79− $(top_srcdir)/include/linux/uaccess_compat.h \
80−+ $(top_srcdir)/include/linux/wait_compat.h \
81− $(top_srcdir)/include/linux/zlib_compat.h
82−
83− USER_H =
84−diff --git a/include/linux/wait_compat.h b/include/linux/wait_compat.h
85−new file mode 100644
86−index 0000000..66f9a9a
87−--- /dev/null
88−+++ b/include/linux/wait_compat.h
89−@@ -0,0 +1,45 @@
90−+/*****************************************************************************\
91−+ * Copyright (C) 2007-2014 Lawrence Livermore National Security, LLC.
92−+ * Copyright (C) 2007 The Regents of the University of California.
93−+ * Produced at Lawrence Livermore National Laboratory (cf, DISCLAIMER).
94−+ * Written by Brian Behlendorf <behlendorf1@llnl.gov>.
95−+ * UCRL-CODE-235197
96−+ *
97−+ * This file is part of the SPL, Solaris Porting Layer.
98−+ * For details, see <http://zfsonlinux.org/>.
99−+ *
100−+ * The SPL is free software; you can redistribute it and/or modify it
101−+ * under the terms of the GNU General Public License as published by the
102−+ * Free Software Foundation; either version 2 of the License, or (at your
103−+ * option) any later version.
104−+ *
105−+ * The SPL is distributed in the hope that it will be useful, but WITHOUT
106−+ * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
107−+ * FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
108−+ * for more details.
109−+ *
110−+ * You should have received a copy of the GNU General Public License along
111−+ * with the SPL. If not, see <http://www.gnu.org/licenses/>.
112−+\*****************************************************************************/
113−+
114−+#ifndef _SPL_WAIT_COMPAT_H
115−+#define _SPL_WAIT_COMPAT_H
116−+
117−+
118−+#ifndef HAVE_WAIT_ON_BIT_ACTION
119−+# define spl_wait_on_bit(word, bit, mode) wait_on_bit(word, bit, mode)
120−+#else
121−+
122−+static inline int
123−+spl_bit_wait(void *word)
124−+{
125−+ schedule();
126−+ return 0;
127−+}
128−+
129−+#define spl_wait_on_bit(word, bit, mode) \
130−+ wait_on_bit(word, bit, spl_bit_wait, mode)
131−+
132−+#endif /* HAVE_WAIT_ON_BIT_ACTION */
133−+
134−+#endif /* SPL_WAIT_COMPAT_H */
135−diff --git a/include/sys/types.h b/include/sys/types.h
136−index decb6bb..fcec0fa 100644
137−--- a/include/sys/types.h
138−+++ b/include/sys/types.h
139−@@ -43,6 +43,7 @@
140− #include <linux/zlib_compat.h>
141− #include <linux/mm_compat.h>
142− #include <linux/delay.h>
143−+#include <linux/wait_compat.h>
144−
145− #ifndef HAVE_UINTPTR_T
146− typedef unsigned long uintptr_t;
147−diff --git a/module/spl/spl-kmem.c b/module/spl/spl-kmem.c
148−index 0a9d775..6de513e 100644
149−--- a/module/spl/spl-kmem.c
150−+++ b/module/spl/spl-kmem.c
151−@@ -1900,13 +1900,6 @@ spl_cache_grow_wait(spl_kmem_cache_t *skc)
152− return !test_bit(KMC_BIT_GROWING, &skc->skc_flags);
153− }
154−
155−-static int
156−-spl_cache_reclaim_wait(void *word)
157−-{
158−- schedule();
159−- return 0;
160−-}
161−-
162− /*
163− * No available objects on any slabs, create a new slab. Note that this
164− * functionality is disabled for KMC_SLAB caches which are backed by the
165−@@ -1928,8 +1921,8 @@ spl_cache_grow(spl_kmem_cache_t *skc, int flags, void **obj)
166− * then return so the local magazine can be rechecked for new objects.
167− */
168− if (test_bit(KMC_BIT_REAPING, &skc->skc_flags)) {
169−- rc = wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING,
170−- spl_cache_reclaim_wait, TASK_UNINTERRUPTIBLE);
171−+ rc = spl_wait_on_bit(&skc->skc_flags, KMC_BIT_REAPING,
172−+ TASK_UNINTERRUPTIBLE);
173− SRETURN(rc ? rc : -EAGAIN);
174− }
175−