aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexey Shvetsov <alexxy@gentoo.org>2013-04-16 15:26:30 +0400
committerAlexey Shvetsov <alexxy@gentoo.org>2013-04-16 15:26:30 +0400
commitc7944dd245c4dd277b1582c50abc24d2bb91b1d4 (patch)
treec16d34efd3593ff166dfe55020e5a43a892fc560 /sys-cluster/lustre
parent[dev-java/netcdf] upstream file changed, yay... (diff)
downloadsci-c7944dd245c4dd277b1582c50abc24d2bb91b1d4.tar.gz
sci-c7944dd245c4dd277b1582c50abc24d2bb91b1d4.tar.bz2
sci-c7944dd245c4dd277b1582c50abc24d2bb91b1d4.zip
Update lustre patches
Package-Manager: portage-2.2.0_alpha173 RepoMan-Options: --force
Diffstat (limited to 'sys-cluster/lustre')
-rw-r--r--sys-cluster/lustre/ChangeLog18
-rw-r--r--sys-cluster/lustre/files/0001-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch4
-rw-r--r--sys-cluster/lustre/files/0002-LU-2800-libcfs-use-sock_alloc_file-instead-of-sock_m.patch10
-rw-r--r--sys-cluster/lustre/files/0003-LU-2850-compat-posix_acl_-to-from-_xattr-take-user_n.patch6
-rw-r--r--sys-cluster/lustre/files/0004-LU-2800-llite-introduce-local-getname.patch4
-rw-r--r--sys-cluster/lustre/files/0005-LU-2850-build-check-header-files-in-generated-uapi-d.patch8
-rw-r--r--sys-cluster/lustre/files/0006-LU-2850-kernel-3.8-upstream-removes-vmtruncate.patch6
-rw-r--r--sys-cluster/lustre/files/0007-LU-2850-kernel-3.8-upstream-kills-daemonize.patch99
-rw-r--r--sys-cluster/lustre/files/0008-LU-2987-llite-rcu-free-inode.patch6
-rw-r--r--sys-cluster/lustre/files/0009-LU-2850-kernel-3.9-hlist_for_each_entry-uses-3-args.patch (renamed from sys-cluster/lustre/files/0011-LU-2850-kernel-3.9-hlist_for_each_entry-uses-3-args.patch)6
-rw-r--r--sys-cluster/lustre/files/0009-LU-3011-ubuntu-Fix-build-failures-on-Ubuntu-12.04.patch58
-rw-r--r--sys-cluster/lustre/files/0010-LU-2850-kernel-f_vfsmnt-replaced-by-f_path.mnt.patch (renamed from sys-cluster/lustre/files/0012-LU-2850-kernel-f_vfsmnt-replaced-by-f_path.mnt.patch)6
-rw-r--r--sys-cluster/lustre/files/0010-LU-3077-build-fix-warnings-in-client-modules.patch34
-rw-r--r--sys-cluster/lustre/files/0011-LU-3117-build-zfs-0.6.1-kmod-dkms-compatibility.patch923
-rw-r--r--sys-cluster/lustre/lustre-9999.ebuild12
15 files changed, 1030 insertions, 170 deletions
diff --git a/sys-cluster/lustre/ChangeLog b/sys-cluster/lustre/ChangeLog
index 4140e1aa0..bba7cee90 100644
--- a/sys-cluster/lustre/ChangeLog
+++ b/sys-cluster/lustre/ChangeLog
@@ -2,6 +2,24 @@
# Copyright 1999-2013 Gentoo Foundation; Distributed under the GPL v2
# $Header: $
+ 16 Apr 2013; Alexey Shvetsov <alexxy@gentoo.org>
+ +files/0009-LU-2850-kernel-3.9-hlist_for_each_entry-uses-3-args.patch,
+ +files/0010-LU-2850-kernel-f_vfsmnt-replaced-by-f_path.mnt.patch,
+ +files/0011-LU-3117-build-zfs-0.6.1-kmod-dkms-compatibility.patch,
+ -files/0009-LU-3011-ubuntu-Fix-build-failures-on-Ubuntu-12.04.patch,
+ -files/0010-LU-3077-build-fix-warnings-in-client-modules.patch,
+ -files/0011-LU-2850-kernel-3.9-hlist_for_each_entry-uses-3-args.patch,
+ -files/0012-LU-2850-kernel-f_vfsmnt-replaced-by-f_path.mnt.patch,
+ files/0001-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch,
+ files/0002-LU-2800-libcfs-use-sock_alloc_file-instead-of-sock_m.patch,
+ files/0003-LU-2850-compat-posix_acl_-to-from-_xattr-take-user_n.patch,
+ files/0004-LU-2800-llite-introduce-local-getname.patch,
+ files/0005-LU-2850-build-check-header-files-in-generated-uapi-d.patch,
+ files/0006-LU-2850-kernel-3.8-upstream-removes-vmtruncate.patch,
+ files/0007-LU-2850-kernel-3.8-upstream-kills-daemonize.patch,
+ files/0008-LU-2987-llite-rcu-free-inode.patch, lustre-9999.ebuild:
+ Update lustre patches
+
31 Mar 2013; Alexey Shvetsov <alexxy@gentoo.org>
+files/0010-LU-3077-build-fix-warnings-in-client-modules.patch,
+files/0011-LU-2850-kernel-3.9-hlist_for_each_entry-uses-3-args.patch,
diff --git a/sys-cluster/lustre/files/0001-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch b/sys-cluster/lustre/files/0001-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch
index 7eb782931..254e22898 100644
--- a/sys-cluster/lustre/files/0001-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch
+++ b/sys-cluster/lustre/files/0001-LU-2982-build-make-AC-check-for-linux-arch-sandbox-f.patch
@@ -1,7 +1,7 @@
-From d0169772fa2ebda3ed5c619d5e5cd6339973b0a0 Mon Sep 17 00:00:00 2001
+From 6e54f97374f158165cc591c3c41d3db506da26ba Mon Sep 17 00:00:00 2001
From: Alexey Shvetsov <alexxy@gentoo.org>
Date: Mon, 18 Mar 2013 16:22:27 +0400
-Subject: [PATCH 01/12] LU-2982 build: make AC check for linux arch sandbox
+Subject: [PATCH 01/11] LU-2982 build: make AC check for linux arch sandbox
friendly
this commit makes AC check for linux kernel arch sandbox friendly
diff --git a/sys-cluster/lustre/files/0002-LU-2800-libcfs-use-sock_alloc_file-instead-of-sock_m.patch b/sys-cluster/lustre/files/0002-LU-2800-libcfs-use-sock_alloc_file-instead-of-sock_m.patch
index a5b6dafa7..a8797a05b 100644
--- a/sys-cluster/lustre/files/0002-LU-2800-libcfs-use-sock_alloc_file-instead-of-sock_m.patch
+++ b/sys-cluster/lustre/files/0002-LU-2800-libcfs-use-sock_alloc_file-instead-of-sock_m.patch
@@ -1,7 +1,7 @@
-From 8258deb14e38559bf5ef37bd50a0918cdf473c00 Mon Sep 17 00:00:00 2001
+From 18036cc8a9ddc00c269b9b3b7ea25529a0a25e9b Mon Sep 17 00:00:00 2001
From: Jeff Mahoney <jeffm@suse.com>
Date: Wed, 13 Feb 2013 02:45:16 -0500
-Subject: [PATCH 02/12] LU-2800 libcfs: use sock_alloc_file instead of
+Subject: [PATCH 02/11] LU-2800 libcfs: use sock_alloc_file instead of
sock_map_fd
v2.6.27 added a second argument to sock_map_fd. Earlier versions are
@@ -19,7 +19,7 @@ Change-Id: I4e12da8c102b5d682db9658187330ae601b00a21
2 files changed, 22 insertions(+), 13 deletions(-)
diff --git a/libcfs/autoconf/lustre-libcfs.m4 b/libcfs/autoconf/lustre-libcfs.m4
-index e661f7d..e84cd74 100644
+index 312542d..380fd5b 100644
--- a/libcfs/autoconf/lustre-libcfs.m4
+++ b/libcfs/autoconf/lustre-libcfs.m4
@@ -500,18 +500,19 @@ LB_LINUX_TRY_COMPILE([
@@ -49,7 +49,7 @@ index e661f7d..e84cd74 100644
])
])
-@@ -824,7 +825,6 @@ LIBCFS_CPU_TOPOLOGY
+@@ -834,7 +835,6 @@ LIBCFS_CPU_TOPOLOGY
LIBCFS_STRUCT_SHASH_ALG
# 2.6.30
LIBCFS_FUNC_UNSHARE_FS_STRUCT
@@ -57,7 +57,7 @@ index e661f7d..e84cd74 100644
# 2.6.31
LIBCFS_HAVE_SET_MEMS_ALLOWED
# 2.6.32
-@@ -840,6 +840,8 @@ LIBCFS_ADD_WAIT_QUEUE_EXCLUSIVE
+@@ -850,6 +850,8 @@ LIBCFS_ADD_WAIT_QUEUE_EXCLUSIVE
LC_SK_SLEEP
# 2.6.40 fc15
LC_SHRINK_CONTROL
diff --git a/sys-cluster/lustre/files/0003-LU-2850-compat-posix_acl_-to-from-_xattr-take-user_n.patch b/sys-cluster/lustre/files/0003-LU-2850-compat-posix_acl_-to-from-_xattr-take-user_n.patch
index 8ada9e89b..f713d050b 100644
--- a/sys-cluster/lustre/files/0003-LU-2850-compat-posix_acl_-to-from-_xattr-take-user_n.patch
+++ b/sys-cluster/lustre/files/0003-LU-2850-compat-posix_acl_-to-from-_xattr-take-user_n.patch
@@ -1,7 +1,7 @@
-From 3050d2c9cccb51ce521bdbecd471cb6ce18f77b8 Mon Sep 17 00:00:00 2001
+From f2c24d99e4d2bd77411acc300d11ab70fc9d6abc Mon Sep 17 00:00:00 2001
From: Jeff Mahoney <jeffm@suse.com>
Date: Wed, 20 Mar 2013 17:33:17 -0400
-Subject: [PATCH 03/12] LU-2850 compat: posix_acl_{to,from}_xattr take
+Subject: [PATCH 03/11] LU-2850 compat: posix_acl_{to,from}_xattr take
user_namespace
Commit 5f3a4a28 (v3.7) added a struct user_namespace argument to
@@ -67,7 +67,7 @@ index 53975ab..fa4e4d4 100644
+#endif
#endif
diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4
-index 601155c..125bde7 100644
+index 40c4680..b9ff1ca 100644
--- a/lustre/autoconf/lustre-core.m4
+++ b/lustre/autoconf/lustre-core.m4
@@ -2233,6 +2233,25 @@ LB_LINUX_TRY_COMPILE([
diff --git a/sys-cluster/lustre/files/0004-LU-2800-llite-introduce-local-getname.patch b/sys-cluster/lustre/files/0004-LU-2800-llite-introduce-local-getname.patch
index a0e24215d..859adce8c 100644
--- a/sys-cluster/lustre/files/0004-LU-2800-llite-introduce-local-getname.patch
+++ b/sys-cluster/lustre/files/0004-LU-2800-llite-introduce-local-getname.patch
@@ -1,7 +1,7 @@
-From 4f1bc5cb857ebba89b84d27ed5ed6531b8a59058 Mon Sep 17 00:00:00 2001
+From 29d6316336d5673e8c90d819b82fb202357ba9e2 Mon Sep 17 00:00:00 2001
From: Jeff Mahoney <jeffm@suse.com>
Date: Tue, 19 Mar 2013 21:18:32 -0400
-Subject: [PATCH 04/12] LU-2800 llite: introduce local getname()
+Subject: [PATCH 04/11] LU-2800 llite: introduce local getname()
Commit 8e377d15 (v3.7) unexported getname and putname. Although
getname was re-exported, putname was not. All we really need is
diff --git a/sys-cluster/lustre/files/0005-LU-2850-build-check-header-files-in-generated-uapi-d.patch b/sys-cluster/lustre/files/0005-LU-2850-build-check-header-files-in-generated-uapi-d.patch
index 78c264f5e..a0d38e2cf 100644
--- a/sys-cluster/lustre/files/0005-LU-2850-build-check-header-files-in-generated-uapi-d.patch
+++ b/sys-cluster/lustre/files/0005-LU-2850-build-check-header-files-in-generated-uapi-d.patch
@@ -1,7 +1,7 @@
-From 60c775330c663b7ecd32f314ab156ad0ba0ea072 Mon Sep 17 00:00:00 2001
+From a0e92d4f975aedaa563d0a9f12ef0774d7cde352 Mon Sep 17 00:00:00 2001
From: Peng Tao <tao.peng@emc.com>
Date: Wed, 27 Feb 2013 18:29:34 +0800
-Subject: [PATCH 05/12] LU-2850 build: check header files in generated uapi dir
+Subject: [PATCH 05/11] LU-2850 build: check header files in generated uapi dir
Upstream moved UAPI headers into generated/uapi directory since
v3.7. We need to check/include necessary header files there.
@@ -83,7 +83,7 @@ index 244d398..b995875 100644
[_AC_MSG_LOG_CONFTEST
m4_ifvaln([$5],[$5])dnl])
diff --git a/ldiskfs/config/ldiskfs-build.m4 b/ldiskfs/config/ldiskfs-build.m4
-index fd0f6d2..d657399 100644
+index 2feec80..4a4ecf4 100644
--- a/ldiskfs/config/ldiskfs-build.m4
+++ b/ldiskfs/config/ldiskfs-build.m4
@@ -1,11 +1,11 @@
@@ -132,7 +132,7 @@ index fd0f6d2..d657399 100644
# enable extensive workarounds to get this to build
# modules
diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4
-index 125bde7..5b82ff8 100644
+index b9ff1ca..c13ad6a 100644
--- a/lustre/autoconf/lustre-core.m4
+++ b/lustre/autoconf/lustre-core.m4
@@ -319,7 +319,7 @@ AC_DEFUN([LC_BIT_SPINLOCK_H],
diff --git a/sys-cluster/lustre/files/0006-LU-2850-kernel-3.8-upstream-removes-vmtruncate.patch b/sys-cluster/lustre/files/0006-LU-2850-kernel-3.8-upstream-removes-vmtruncate.patch
index 39f4b4bb0..c0099c30b 100644
--- a/sys-cluster/lustre/files/0006-LU-2850-kernel-3.8-upstream-removes-vmtruncate.patch
+++ b/sys-cluster/lustre/files/0006-LU-2850-kernel-3.8-upstream-removes-vmtruncate.patch
@@ -1,7 +1,7 @@
-From 19491f9e67e43ae10ae1f71e38730606e2c518a8 Mon Sep 17 00:00:00 2001
+From de4775789c14be8dce4b8dbb168c06c0055d1ca2 Mon Sep 17 00:00:00 2001
From: Alexey Shvetsov <alexxy@gentoo.org>
Date: Wed, 27 Mar 2013 08:49:01 +0400
-Subject: [PATCH 06/12] LU-2850 kernel: 3.8 upstream removes vmtruncate()
+Subject: [PATCH 06/11] LU-2850 kernel: 3.8 upstream removes vmtruncate()
vmtruncate() is removed since upstream commit b9f61c3.
We can open code is for llite though.
@@ -14,7 +14,7 @@ Change-Id: I9d4f43a5c181f16482b4caa021ba7a09ee52b600
2 files changed, 32 insertions(+)
diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4
-index 5b82ff8..d736343 100644
+index c13ad6a..604e00b 100644
--- a/lustre/autoconf/lustre-core.m4
+++ b/lustre/autoconf/lustre-core.m4
@@ -2252,6 +2252,25 @@ LB_LINUX_TRY_COMPILE([
diff --git a/sys-cluster/lustre/files/0007-LU-2850-kernel-3.8-upstream-kills-daemonize.patch b/sys-cluster/lustre/files/0007-LU-2850-kernel-3.8-upstream-kills-daemonize.patch
index 608af56d2..c8207a020 100644
--- a/sys-cluster/lustre/files/0007-LU-2850-kernel-3.8-upstream-kills-daemonize.patch
+++ b/sys-cluster/lustre/files/0007-LU-2850-kernel-3.8-upstream-kills-daemonize.patch
@@ -1,7 +1,7 @@
-From fc013881dd3b551e8fb8a5f6722a359c56c7bf63 Mon Sep 17 00:00:00 2001
+From 08c0e5bebb11c18370cce8b437d8e73b9d5d49db Mon Sep 17 00:00:00 2001
From: Peng Tao <tao.peng@emc.com>
Date: Mon, 18 Mar 2013 10:47:57 +0800
-Subject: [PATCH 07/12] LU-2850 kernel: 3.8 upstream kills daemonize()
+Subject: [PATCH 07/11] LU-2850 kernel: 3.8 upstream kills daemonize()
kernel_thread() is a low level kernel function.
Instead of calling kernel_thread() and relying on daemonize()
@@ -16,7 +16,7 @@ Signed-off-by: Peng Tao <tao.peng@emc.com>
Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
Change-Id: I9f977bfc5d58192957d8c8d634204f4910edfa2a
---
- libcfs/autoconf/lustre-libcfs.m4 | 28 -----------
+ libcfs/autoconf/lustre-libcfs.m4 | 37 --------------
libcfs/include/libcfs/darwin/darwin-prim.h | 6 +--
libcfs/include/libcfs/libcfs.h | 13 +----
libcfs/include/libcfs/linux/linux-prim.h | 9 ----
@@ -67,7 +67,7 @@ Change-Id: I9f977bfc5d58192957d8c8d634204f4910edfa2a
lustre/llite/lloop.c | 10 ++--
lustre/llite/statahead.c | 61 +++++++++++-----------
lustre/mdc/mdc_request.c | 34 ++++++-------
- lustre/mdd/mdd_lfsck.c | 5 +-
+ lustre/mdd/mdd_lfsck.c | 7 ++-
lustre/mdt/mdt_capa.c | 26 +++++-----
lustre/mgc/mgc_request.c | 31 ++++++------
lustre/mgs/mgs_nids.c | 13 ++---
@@ -84,14 +84,14 @@ Change-Id: I9f977bfc5d58192957d8c8d634204f4910edfa2a
lustre/quota/qmt_lock.c | 17 +++----
lustre/quota/qsd_reint.c | 6 +--
lustre/quota/qsd_writeback.c | 16 +++---
- 68 files changed, 514 insertions(+), 753 deletions(-)
+ 68 files changed, 515 insertions(+), 763 deletions(-)
delete mode 100644 libcfs/libcfs/linux/linux-lwt.c
diff --git a/libcfs/autoconf/lustre-libcfs.m4 b/libcfs/autoconf/lustre-libcfs.m4
-index e84cd74..5789166 100644
+index 380fd5b..a1ed4b0 100644
--- a/libcfs/autoconf/lustre-libcfs.m4
+++ b/libcfs/autoconf/lustre-libcfs.m4
-@@ -639,15 +639,6 @@ LB_LINUX_TRY_COMPILE([
+@@ -639,24 +639,6 @@ LB_LINUX_TRY_COMPILE([
])
])
@@ -104,10 +104,19 @@ index e84cd74..5789166 100644
-])
-])
-
+-AC_DEFUN([LIBCFS_HAVE_KEYTYPE_H],
+-[LB_CHECK_FILE([$LINUX/include/linux/key-type.h], [
+- AC_DEFINE(HAVE_LINUX_KEYTYPE_H, 1,
+- [kernel has include/key-type.h])
+-],[
+- AC_MSG_RESULT([no])
+-])
+-])
+-
#
# check set_mems_allowed
# 2.6.31 adds function set_mems_allowed in cpuset.h
-@@ -688,23 +679,6 @@ LB_LINUX_TRY_COMPILE([
+@@ -697,23 +679,6 @@ LB_LINUX_TRY_COMPILE([
])
])
@@ -131,7 +140,7 @@ index e84cd74..5789166 100644
#
# 2.6.33 no longer has ctl_name & strategy field in struct ctl_table.
#
-@@ -830,8 +804,6 @@ LIBCFS_HAVE_SET_MEMS_ALLOWED
+@@ -840,8 +805,6 @@ LIBCFS_HAVE_SET_MEMS_ALLOWED
# 2.6.32
LIBCFS_STACKTRACE_OPS_HAVE_WALK_STACK
LC_SHRINKER_WANT_SHRINK_PTR
@@ -1804,7 +1813,7 @@ index 2e3a1d5..e61583a 100644
void target_stop_recovery_thread(struct obd_device *obd)
diff --git a/lustre/ldlm/ldlm_lockd.c b/lustre/ldlm/ldlm_lockd.c
-index 8d2057f..d3d1e59 100644
+index 31925ff..3a9bf14 100644
--- a/lustre/ldlm/ldlm_lockd.c
+++ b/lustre/ldlm/ldlm_lockd.c
@@ -178,7 +178,6 @@ static int expired_lock_main(void *arg)
@@ -2267,18 +2276,20 @@ index c9aa7a0..ead4bcf 100644
CERROR("Failed to start changelog thread: %d\n", rc);
OBD_FREE_PTR(cs);
diff --git a/lustre/mdd/mdd_lfsck.c b/lustre/mdd/mdd_lfsck.c
-index bca6ce1..540b7a1 100644
+index 9d7b54c..7ced9dd 100644
--- a/lustre/mdd/mdd_lfsck.c
+++ b/lustre/mdd/mdd_lfsck.c
-@@ -2615,7 +2615,6 @@ static int mdd_lfsck_main(void *args)
+@@ -2525,8 +2525,7 @@ static int mdd_lfsck_main(void *args)
int rc;
ENTRY;
- cfs_daemonize("lfsck");
- rc = lu_env_init(&env, LCT_MD_THREAD | LCT_DT_THREAD);
+- rc = lu_env_init(&env, LCT_MD_THREAD);
++ rc = lu_env_init(&env, LCT_MD_THREAD | LCT_DT_THREAD);
if (rc != 0) {
CERROR("%s: LFSCK, fail to init env, rc = %d\n",
-@@ -2879,8 +2878,8 @@ trigger:
+ mdd_lfsck2name(lfsck), rc);
+@@ -2789,8 +2788,8 @@ trigger:
lfsck->ml_args_oit = (flags << DT_OTABLE_IT_FLAGS_SHIFT) | valid;
thread_set_flags(thread, 0);
@@ -2334,7 +2345,7 @@ index 76e2c6f..d4a8bc4 100644
void mdt_ck_thread_stop(struct mdt_device *mdt)
diff --git a/lustre/mgc/mgc_request.c b/lustre/mgc/mgc_request.c
-index 9e2357b..01bb584 100644
+index 6b84a29..f7e6514 100644
--- a/lustre/mgc/mgc_request.c
+++ b/lustre/mgc/mgc_request.c
@@ -480,12 +480,9 @@ static void do_requeue(struct config_llog_data *cld)
@@ -2425,10 +2436,10 @@ index 781250f..e6abdc4 100644
mgs_nidtbl_init_fs(env, fsdb);
return 0;
diff --git a/lustre/obdclass/genops.c b/lustre/obdclass/genops.c
-index cd1443c..42100d5 100644
+index 436aa4d..0e29783 100644
--- a/lustre/obdclass/genops.c
+++ b/lustre/obdclass/genops.c
-@@ -1745,14 +1745,7 @@ EXPORT_SYMBOL(obd_zombie_barrier);
+@@ -1744,14 +1744,7 @@ EXPORT_SYMBOL(obd_zombie_barrier);
*/
static int obd_zombie_impexp_thread(void *unused)
{
@@ -2444,7 +2455,7 @@ index cd1443c..42100d5 100644
complete(&obd_zombie_start);
obd_zombie_pid = cfs_curproc_pid();
-@@ -1801,7 +1794,9 @@ int obd_zombie_impexp_kill(void *arg)
+@@ -1800,7 +1793,9 @@ int obd_zombie_impexp_kill(void *arg)
*/
int obd_zombie_impexp_init(void)
{
@@ -2455,7 +2466,7 @@ index cd1443c..42100d5 100644
CFS_INIT_LIST_HEAD(&obd_zombie_imports);
CFS_INIT_LIST_HEAD(&obd_zombie_exports);
-@@ -1812,9 +1807,9 @@ int obd_zombie_impexp_init(void)
+@@ -1811,9 +1806,9 @@ int obd_zombie_impexp_init(void)
obd_zombie_pid = 0;
#ifdef __KERNEL__
@@ -2468,7 +2479,7 @@ index cd1443c..42100d5 100644
wait_for_completion(&obd_zombie_start);
#else
-@@ -1826,9 +1821,8 @@ int obd_zombie_impexp_init(void)
+@@ -1825,9 +1820,8 @@ int obd_zombie_impexp_init(void)
obd_zombie_impexp_idle_cb =
liblustre_register_idle_callback("obd_zombi_impexp_check",
&obd_zombie_impexp_check, NULL);
@@ -2480,10 +2491,10 @@ index cd1443c..42100d5 100644
/**
* stop destroy zombie import/export thread
diff --git a/lustre/obdclass/llog.c b/lustre/obdclass/llog.c
-index f08fd6e..ce22932 100644
+index 62c496b..d85b048 100644
--- a/lustre/obdclass/llog.c
+++ b/lustre/obdclass/llog.c
-@@ -440,7 +440,7 @@ static int llog_process_thread_daemonize(void *arg)
+@@ -438,7 +438,7 @@ static int llog_process_thread_daemonize(void *arg)
struct lu_env env;
int rc;
@@ -2492,7 +2503,7 @@ index f08fd6e..ce22932 100644
/* client env has no keys, tags is just 0 */
rc = lu_env_init(&env, LCT_LOCAL | LCT_MG_THREAD);
-@@ -482,9 +482,9 @@ int llog_process_or_fork(const struct lu_env *env,
+@@ -480,9 +480,9 @@ int llog_process_or_fork(const struct lu_env *env,
* init the new one in llog_process_thread_daemonize. */
lpi->lpi_env = NULL;
init_completion(&lpi->lpi_completion);
@@ -2506,10 +2517,10 @@ index f08fd6e..ce22932 100644
loghandle->lgh_ctxt->loc_obd->obd_name, rc);
OBD_FREE_PTR(lpi);
diff --git a/lustre/osd-ldiskfs/osd_scrub.c b/lustre/osd-ldiskfs/osd_scrub.c
-index 1e27918..f122d38 100644
+index 77acd9e..a9130be 100644
--- a/lustre/osd-ldiskfs/osd_scrub.c
+++ b/lustre/osd-ldiskfs/osd_scrub.c
-@@ -962,7 +962,6 @@ static int osd_scrub_main(void *args)
+@@ -979,7 +979,6 @@ static int osd_scrub_main(void *args)
int rc;
ENTRY;
@@ -2517,7 +2528,7 @@ index 1e27918..f122d38 100644
rc = lu_env_init(&env, LCT_DT_THREAD);
if (rc != 0) {
CERROR("%.16s: OI scrub, fail to init env, rc = %d\n",
-@@ -1541,8 +1540,8 @@ again:
+@@ -1554,8 +1553,8 @@ again:
scrub->os_start_flags = flags;
thread_set_flags(thread, 0);
@@ -2529,10 +2540,10 @@ index 1e27918..f122d38 100644
LDISKFS_SB(osd_sb(dev))->s_es->s_volume_name, rc);
RETURN(rc);
diff --git a/lustre/osp/osp_precreate.c b/lustre/osp/osp_precreate.c
-index 9b3febc..51c2c94 100644
+index 914f988..d0d2ede 100644
--- a/lustre/osp/osp_precreate.c
+++ b/lustre/osp/osp_precreate.c
-@@ -881,15 +881,11 @@ static int osp_precreate_thread(void *_arg)
+@@ -872,15 +872,11 @@ static int osp_precreate_thread(void *_arg)
struct osp_device *d = _arg;
struct ptlrpc_thread *thread = &d->opd_pre_thread;
struct l_wait_info lwi = { 0 };
@@ -2548,7 +2559,7 @@ index 9b3febc..51c2c94 100644
rc = lu_env_init(&env, d->opd_dt_dev.dd_lu_dev.ld_type->ldt_ctx_tags);
if (rc) {
CERROR("%s: init env error: rc = %d\n", d->opd_obd->obd_name,
-@@ -1260,7 +1256,7 @@ out:
+@@ -1251,7 +1247,7 @@ out:
int osp_init_precreate(struct osp_device *d)
{
struct l_wait_info lwi = { 0 };
@@ -2557,7 +2568,7 @@ index 9b3febc..51c2c94 100644
ENTRY;
-@@ -1295,10 +1291,11 @@ int osp_init_precreate(struct osp_device *d)
+@@ -1286,10 +1282,11 @@ int osp_init_precreate(struct osp_device *d)
/*
* start thread handling precreation and statfs updates
*/
@@ -2574,10 +2585,10 @@ index 9b3febc..51c2c94 100644
l_wait_event(d->opd_pre_thread.t_ctl_waitq,
diff --git a/lustre/osp/osp_sync.c b/lustre/osp/osp_sync.c
-index dfa263e..fddd9b6 100644
+index 4bc9d58..a6952ce 100644
--- a/lustre/osp/osp_sync.c
+++ b/lustre/osp/osp_sync.c
-@@ -827,7 +827,6 @@ static int osp_sync_thread(void *_arg)
+@@ -823,7 +823,6 @@ static int osp_sync_thread(void *_arg)
struct llog_handle *llh;
struct lu_env env;
int rc, count;
@@ -2585,7 +2596,7 @@ index dfa263e..fddd9b6 100644
ENTRY;
-@@ -838,9 +837,6 @@ static int osp_sync_thread(void *_arg)
+@@ -834,9 +833,6 @@ static int osp_sync_thread(void *_arg)
RETURN(rc);
}
@@ -2595,7 +2606,7 @@ index dfa263e..fddd9b6 100644
spin_lock(&d->opd_syn_lock);
thread->t_flags = SVC_RUNNING;
spin_unlock(&d->opd_syn_lock);
-@@ -1044,8 +1040,9 @@ int osp_sync_init(const struct lu_env *env, struct osp_device *d)
+@@ -1041,8 +1037,9 @@ int osp_sync_init(const struct lu_env *env, struct osp_device *d)
cfs_waitq_init(&d->opd_syn_thread.t_ctl_waitq);
CFS_INIT_LIST_HEAD(&d->opd_syn_committed_there);
@@ -2660,10 +2671,10 @@ index 7eaee96..9d17417 100644
ptlrpc_invalidate_import(imp);
diff --git a/lustre/ptlrpc/pinger.c b/lustre/ptlrpc/pinger.c
-index f5bf639..816d054 100644
+index 8b7d472..e18bc7d 100644
--- a/lustre/ptlrpc/pinger.c
+++ b/lustre/ptlrpc/pinger.c
-@@ -286,8 +286,6 @@ static int ptlrpc_pinger_main(void *arg)
+@@ -306,8 +306,6 @@ static int ptlrpc_pinger_main(void *arg)
struct ptlrpc_thread *thread = (struct ptlrpc_thread *)arg;
ENTRY;
@@ -2672,7 +2683,7 @@ index f5bf639..816d054 100644
/* Record that the thread is running */
thread_set_flags(thread, SVC_RUNNING);
cfs_waitq_signal(&thread->t_ctl_waitq);
-@@ -382,14 +380,14 @@ int ptlrpc_start_pinger(void)
+@@ -402,14 +400,14 @@ int ptlrpc_start_pinger(void)
/* CLONE_VM and CLONE_FILES just avoid a needless copy, because we
* just drop the VM and FILES in cfs_daemonize_ctxt() right away. */
@@ -2695,7 +2706,7 @@ index f5bf639..816d054 100644
l_wait_event(pinger_thread->t_ctl_waitq,
thread_is_running(pinger_thread), &lwi);
-@@ -658,7 +656,7 @@ static int ping_evictor_main(void *arg)
+@@ -678,7 +676,7 @@ static int ping_evictor_main(void *arg)
time_t expire_time;
ENTRY;
@@ -2704,7 +2715,7 @@ index f5bf639..816d054 100644
CDEBUG(D_HA, "Starting Ping Evictor\n");
pet_state = PET_READY;
-@@ -733,18 +731,19 @@ static int ping_evictor_main(void *arg)
+@@ -753,18 +751,19 @@ static int ping_evictor_main(void *arg)
void ping_evictor_start(void)
{
@@ -2816,10 +2827,10 @@ index 7634d22..595f710 100644
l_wait_event(sec_gc_thread.t_ctl_waitq,
diff --git a/lustre/ptlrpc/service.c b/lustre/ptlrpc/service.c
-index 6278f7b..a0082e4 100644
+index 63fee6d..7d73b13 100644
--- a/lustre/ptlrpc/service.c
+++ b/lustre/ptlrpc/service.c
-@@ -2366,7 +2366,7 @@ static int ptlrpc_main(void *arg)
+@@ -2362,7 +2362,7 @@ static int ptlrpc_main(void *arg)
ENTRY;
thread->t_pid = cfs_curproc_pid();
@@ -2828,7 +2839,7 @@ index 6278f7b..a0082e4 100644
/* NB: we will call cfs_cpt_bind() for all threads, because we
* might want to run lustre server only on a subset of system CPUs,
-@@ -2561,7 +2561,7 @@ static int ptlrpc_hr_main(void *arg)
+@@ -2557,7 +2557,7 @@ static int ptlrpc_hr_main(void *arg)
snprintf(threadname, sizeof(threadname), "ptlrpc_hr%02d_%03d",
hrp->hrp_cpt, hrt->hrt_id);
@@ -2837,7 +2848,7 @@ index 6278f7b..a0082e4 100644
rc = cfs_cpt_bind(ptlrpc_hr.hr_cpt_table, hrp->hrp_cpt);
if (rc != 0) {
-@@ -2627,10 +2627,13 @@ static int ptlrpc_start_hr_threads(void)
+@@ -2623,10 +2623,13 @@ static int ptlrpc_start_hr_threads(void)
int rc = 0;
for (j = 0; j < hrp->hrp_nthrs; j++) {
@@ -2855,7 +2866,7 @@ index 6278f7b..a0082e4 100644
break;
}
cfs_wait_event(ptlrpc_hr.hr_waitq,
-@@ -2822,8 +2825,8 @@ int ptlrpc_start_thread(struct ptlrpc_service_part *svcpt, int wait)
+@@ -2818,8 +2821,8 @@ int ptlrpc_start_thread(struct ptlrpc_service_part *svcpt, int wait)
* CLONE_VM and CLONE_FILES just avoid a needless copy, because we
* just drop the VM and FILES in cfs_daemonize_ctxt() right away.
*/
diff --git a/sys-cluster/lustre/files/0008-LU-2987-llite-rcu-free-inode.patch b/sys-cluster/lustre/files/0008-LU-2987-llite-rcu-free-inode.patch
index b444050fd..915e072b1 100644
--- a/sys-cluster/lustre/files/0008-LU-2987-llite-rcu-free-inode.patch
+++ b/sys-cluster/lustre/files/0008-LU-2987-llite-rcu-free-inode.patch
@@ -1,7 +1,7 @@
-From 77ae599340fc509002f2875257c2e024fb1b44fb Mon Sep 17 00:00:00 2001
+From 1abfc6069f78a8efd6002dfe09b6a8196f47552b Mon Sep 17 00:00:00 2001
From: Peng Tao <tao.peng@emc.com>
Date: Tue, 19 Mar 2013 14:04:47 +0800
-Subject: [PATCH 08/12] LU-2987 llite: rcu-free inode
+Subject: [PATCH 08/11] LU-2987 llite: rcu-free inode
Since 2.6.38, inode.i_rcu was added and file system .destory_inode
should rcu-free inodes.
@@ -14,7 +14,7 @@ Change-Id: Idc12c94fd1bf9c99756c9bcb2d07f3061e6dad5a
2 files changed, 37 insertions(+), 2 deletions(-)
diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4
-index d736343..4e90e86 100644
+index 604e00b..bf83193 100644
--- a/lustre/autoconf/lustre-core.m4
+++ b/lustre/autoconf/lustre-core.m4
@@ -1682,6 +1682,26 @@ LB_LINUX_TRY_COMPILE([
diff --git a/sys-cluster/lustre/files/0011-LU-2850-kernel-3.9-hlist_for_each_entry-uses-3-args.patch b/sys-cluster/lustre/files/0009-LU-2850-kernel-3.9-hlist_for_each_entry-uses-3-args.patch
index 3968eae4f..faa30e641 100644
--- a/sys-cluster/lustre/files/0011-LU-2850-kernel-3.9-hlist_for_each_entry-uses-3-args.patch
+++ b/sys-cluster/lustre/files/0009-LU-2850-kernel-3.9-hlist_for_each_entry-uses-3-args.patch
@@ -1,7 +1,7 @@
-From 11a0f9a2ac7d3d1bcda9a8bd3af5800cee35249d Mon Sep 17 00:00:00 2001
+From 8ef04c8c6d6d8e9e5ba187ba1e88965aabf9794c Mon Sep 17 00:00:00 2001
From: Alexey Shvetsov <alexxy@gentoo.org>
Date: Sun, 31 Mar 2013 19:32:30 +0400
-Subject: [PATCH 11/12] LU-2850 kernel: 3.9 hlist_for_each_entry uses 3 args
+Subject: [PATCH 09/11] LU-2850 kernel: 3.9 hlist_for_each_entry uses 3 args
In 3.9 hlist_for_each_entry use 3 args since commit
@@ -49,7 +49,7 @@ index be06e74..b747804 100644
#define CFS_HLIST_HEAD_INIT HLIST_HEAD_INIT
#define CFS_HLIST_HEAD(n) HLIST_HEAD(n)
diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4
-index 4e90e86..527052e 100644
+index bf83193..5c1fee2 100644
--- a/lustre/autoconf/lustre-core.m4
+++ b/lustre/autoconf/lustre-core.m4
@@ -2291,6 +2291,29 @@ LB_LINUX_TRY_COMPILE([
diff --git a/sys-cluster/lustre/files/0009-LU-3011-ubuntu-Fix-build-failures-on-Ubuntu-12.04.patch b/sys-cluster/lustre/files/0009-LU-3011-ubuntu-Fix-build-failures-on-Ubuntu-12.04.patch
deleted file mode 100644
index ea056b4b9..000000000
--- a/sys-cluster/lustre/files/0009-LU-3011-ubuntu-Fix-build-failures-on-Ubuntu-12.04.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 84010884ffc614cc0d5cf06e5416dadc2693a86a Mon Sep 17 00:00:00 2001
-From: Robert Read <robert.read@intel.com>
-Date: Fri, 22 Mar 2013 11:32:13 -0700
-Subject: [PATCH 09/12] LU-3011 ubuntu: Fix build failures on Ubuntu 12.04
-
-Fix "set-but-unused" warning by using the variable,
-and move -lreadline to end of link command line.
-
-Signed-off-by: Robert Read <robert.read.@intel.com>
-Change-Id: I676e319ed81dbb6ba41d039e7b075b02d5122b48
----
- libcfs/autoconf/lustre-libcfs.m4 | 1 +
- lustre/utils/Makefile.am | 8 ++++----
- 2 files changed, 5 insertions(+), 4 deletions(-)
-
-diff --git a/libcfs/autoconf/lustre-libcfs.m4 b/libcfs/autoconf/lustre-libcfs.m4
-index 5789166..72ae7b4 100644
---- a/libcfs/autoconf/lustre-libcfs.m4
-+++ b/libcfs/autoconf/lustre-libcfs.m4
-@@ -918,6 +918,7 @@ AC_COMPILE_IFELSE([
- __u64 *data2 = NULL;
-
- data1 = data2;
-+ data2 = data1;
- return 0;
- }
- ],[
-diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am
-index 1309376..bc8d716 100644
---- a/lustre/utils/Makefile.am
-+++ b/lustre/utils/Makefile.am
-@@ -42,19 +42,19 @@ endif
- noinst_LIBRARIES = liblustreapitmp.a
-
- lctl_SOURCES = lustre_lfsck.c obd.c lustre_cfg.c lctl.c obdctl.h
--lctl_LDADD := $(LIBREADLINE) liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS)
-+lctl_LDADD := liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS) $(LIBREADLINE)
- lctl_DEPENDENCIES := $(LIBPTLCTL) liblustreapi.a
-
- lfs_SOURCES = lfs.c obd.c lustre_cfg.c
--lfs_LDADD := $(LIBREADLINE) liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS)
-+lfs_LDADD := liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS) $(LIBREADLINE)
- lfs_DEPENDENCIES := $(LIBPTLCTL) liblustreapi.a
-
- loadgen_SOURCES = loadgen.c lustre_cfg.c obd.c
--loadgen_LDADD := $(LIBREADLINE) liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS)
-+loadgen_LDADD := liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS) $(LIBREADLINE)
- loadgen_DEPENDENCIES := $(LIBPTLCTL) liblustreapi.a
-
- lustre_rsync_SOURCES = lustre_rsync.c obd.c lustre_cfg.c lustre_rsync.h
--lustre_rsync_LDADD := $(LIBREADLINE) liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS)
-+lustre_rsync_LDADD := liblustreapi.a $(LIBPTLCTL) $(PTHREAD_LIBS) $(LIBREADLINE)
- lustre_rsync_DEPENDENCIES := $(LIBPTLCTL) liblustreapi.a
-
- ll_recover_lost_found_objs_SOURCES = ll_recover_lost_found_objs.c
---
-1.8.1.5
-
diff --git a/sys-cluster/lustre/files/0012-LU-2850-kernel-f_vfsmnt-replaced-by-f_path.mnt.patch b/sys-cluster/lustre/files/0010-LU-2850-kernel-f_vfsmnt-replaced-by-f_path.mnt.patch
index 35905f0f2..611e76267 100644
--- a/sys-cluster/lustre/files/0012-LU-2850-kernel-f_vfsmnt-replaced-by-f_path.mnt.patch
+++ b/sys-cluster/lustre/files/0010-LU-2850-kernel-f_vfsmnt-replaced-by-f_path.mnt.patch
@@ -1,7 +1,7 @@
-From da0f460ee306437c583147ea6832298cbc1e9202 Mon Sep 17 00:00:00 2001
+From 3cde88f309039a3c248e15746d20c6492566b18c Mon Sep 17 00:00:00 2001
From: Alexey Shvetsov <alexxy@gentoo.org>
Date: Sun, 31 Mar 2013 20:13:21 +0400
-Subject: [PATCH 12/12] LU-2850 kernel: f_vfsmnt replaced by f_path.mnt
+Subject: [PATCH 10/11] LU-2850 kernel: f_vfsmnt replaced by f_path.mnt
In linux 3.9 f_vfsmnt was killed and replaced
@@ -21,7 +21,7 @@ Change-Id: I02f595f0b7bbe804c9695d6da2106deb2d17e0ee
2 files changed, 27 insertions(+)
diff --git a/lustre/autoconf/lustre-core.m4 b/lustre/autoconf/lustre-core.m4
-index 527052e..de79357 100644
+index 5c1fee2..439f677 100644
--- a/lustre/autoconf/lustre-core.m4
+++ b/lustre/autoconf/lustre-core.m4
@@ -2314,6 +2314,28 @@ LB_LINUX_TRY_COMPILE([
diff --git a/sys-cluster/lustre/files/0010-LU-3077-build-fix-warnings-in-client-modules.patch b/sys-cluster/lustre/files/0010-LU-3077-build-fix-warnings-in-client-modules.patch
deleted file mode 100644
index 97a9d172f..000000000
--- a/sys-cluster/lustre/files/0010-LU-3077-build-fix-warnings-in-client-modules.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 0ec7b7dc1eafdec4da8a69a0c8ca5bab8c2a1634 Mon Sep 17 00:00:00 2001
-From: Alexey Shvetsov <alexxy@gentoo.org>
-Date: Sun, 31 Mar 2013 19:16:54 +0400
-Subject: [PATCH 10/12] LU-3077 build: fix warnings in client modules
-
-This fixes warning with client module
-memset(attr, 0, sizeof(attr)) :
-argument to "sizeof" in "memset" call is the same expression as the
-destination; did you mean to dereference it
-
-gcc version 4.8.0 (Gentoo 4.8.0 p1.0, pie-0.5.10)
-
-Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
-Change-Id: I85197dfb7e512e4c747a7057632c3ecc7486ed37
----
- lustre/fld/fld_index.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/lustre/fld/fld_index.c b/lustre/fld/fld_index.c
-index cbe8300..a6f9be5 100644
---- a/lustre/fld/fld_index.c
-+++ b/lustre/fld/fld_index.c
-@@ -331,7 +331,7 @@ int fld_index_init(const struct lu_env *env, struct lu_server_fld *fld,
- if (attr == NULL)
- RETURN(-ENOMEM);
-
-- memset(attr, 0, sizeof(attr));
-+ memset(attr, 0, sizeof(*attr));
- attr->la_valid = LA_MODE;
- attr->la_mode = S_IFREG | 0666;
- dof.dof_type = DFT_INDEX;
---
-1.8.1.5
-
diff --git a/sys-cluster/lustre/files/0011-LU-3117-build-zfs-0.6.1-kmod-dkms-compatibility.patch b/sys-cluster/lustre/files/0011-LU-3117-build-zfs-0.6.1-kmod-dkms-compatibility.patch
new file mode 100644
index 000000000..de36db2c8
--- /dev/null
+++ b/sys-cluster/lustre/files/0011-LU-3117-build-zfs-0.6.1-kmod-dkms-compatibility.patch
@@ -0,0 +1,923 @@
+From 1542e6ffacd11b54b5ffe71b0a107be0ce20732d Mon Sep 17 00:00:00 2001
+From: Brian Behlendorf <behlendorf1@llnl.gov>
+Date: Thu, 28 Mar 2013 12:18:27 -0700
+Subject: [PATCH 11/11] LU-3117 build: zfs-0.6.1 kmod+dkms compatibility
+
+With the release of zfs-0.6.1 the default install location of
+the zfs kmod headers and objects has changed. The kmod headers
+which are common for a zfs version are now installed under
+/usr/src/zfs-<version>/ path. The objects, which are kernel
+specific, are installed under /usr/src/zfs-<version>/<kernel>/.
+
+This was done just prior to the official 0.6.1 release because
+this scheme satisfies the packaging requirements of the major
+distributions. Making the change now means we shouldn't need
+to change it again.
+
+To accomidate this change the lustre-build-zfs.m4 has been
+updated in the following ways:
+
+* The new zfs header and object paths were added to the list
+ of default search paths. The DKMS build paths were also added
+ to allow compilation against zfs-kmod or zfs-dkms packages.
+
+* Support for building the spl and zfs code recursively as
+ part of the Lustre build process was removed.
+
+* The lustre-osd-zfs packages 'Requires' line was changed to
+ require zfs-kmod. Either the zfs-kmod or zfs-dkms packages
+ can be used to satisfy this requirement.
+
+* Fix incorrect usage of @ZFS_OBJ@ in osd-zfs/Makefile.in,
+ the include directory us under @ZFS@ with the headers.
+ These happens to be the same location before so it never
+ caused issues.
+
+* EXTRA_LIBZFS_INCLUDE renamed ZFS_LIBZFS_INCLUDE, this was
+ done for consistency.
+
+* Failing to build ldiskfs should not automatically disable
+ all server support. The zfs osd may still be buildable.
+
+* General m4 cleanup and simplification of lustre-build-zfs.m4.
+
+* Ensure new zfs/spl build correctly with lbuild.
+
+Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
+Change-Id: Ib686211c4f9ace39a41053ce8a20112d1121def9
+Signed-off-by: Nathaniel Clark <nathaniel.l.clark@intel.com>
+---
+ autoMakefile.am | 2 +-
+ config/lustre-build-ldiskfs.m4 | 1 -
+ config/lustre-build-zfs.m4 | 731 ++++++++++++++++++-----------------------
+ contrib/lbuild/lbuild | 2 +
+ lustre.spec.in | 2 +-
+ lustre/osd-zfs/Makefile.in | 3 +-
+ lustre/utils/Makefile.am | 6 +-
+ 7 files changed, 326 insertions(+), 421 deletions(-)
+
+diff --git a/autoMakefile.am b/autoMakefile.am
+index 93608de..5880d1c 100644
+--- a/autoMakefile.am
++++ b/autoMakefile.am
+@@ -1,4 +1,4 @@
+-SUBDIRS := @LDISKFS_SUBDIR@ @SPL_SUBDIR@ @ZFS_SUBDIR@ . @LIBSYSIO_SUBDIR@ @SNMP_SUBDIR@ @LUSTREIOKIT_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre
++SUBDIRS := @LDISKFS_SUBDIR@ . @LIBSYSIO_SUBDIR@ @SNMP_SUBDIR@ @LUSTREIOKIT_SUBDIR@ @LIBCFS_SUBDIR@ lnet lustre
+ DIST_SUBDIRS := @LDISKFS_DIST_SUBDIR@ @SNMP_DIST_SUBDIR@ libsysio lustre-iokit @LIBCFS_SUBDIR@ lnet lustre config contrib
+ SOURCES_SUBDIRS := @LIBCFS_SUBDIR@ lnet lustre
+ RPM_SUBDIRS := @LDISKFS_SUBDIR@ @LUSTREIOKIT_SUBDIR@
+diff --git a/config/lustre-build-ldiskfs.m4 b/config/lustre-build-ldiskfs.m4
+index cdcd10b..d680268 100644
+--- a/config/lustre-build-ldiskfs.m4
++++ b/config/lustre-build-ldiskfs.m4
+@@ -190,7 +190,6 @@ else
+ fi
+
+ if test x$enable_ldiskfs_build = xno; then
+- enable_server='no'
+ enable_ldiskfs_build='no'
+ with_ldiskfs='no'
+ LDISKFS_SUBDIR=
+diff --git a/config/lustre-build-zfs.m4 b/config/lustre-build-zfs.m4
+index bfc647f..507afd8 100644
+--- a/config/lustre-build-zfs.m4
++++ b/config/lustre-build-zfs.m4
+@@ -1,445 +1,350 @@
+-#
+-# LB_PATH_SPL
+-#
+-# --with-spl - Enable spl support and attempt to autodetect the spl
+-# --with-spl=yes headers in one of the following places in this order:
+-# * ./spl
+-# * /usr/src/spl-*/$LINUXRELEASE
+-# * ../spl
+-#
+-# --with-spl=path - Enable spl support and use the spl headers in the
+-# provided path. No autodetection is performed.
+-#
+-# --with-spl-obj - When spl support is enabled the object directory
+-# will be based on the --with-spl directory. If this
+-# is detected incorrectly it can be explicitly
+-# specified using this option.
+-#
+-# NOTE: As with all external packages spl is expected to already be
+-# configured and built. However, if the spl tree is located in-tree
+-# (./spl) then it will be configured and built recursively as part of
+-# the lustre build system.
+-#
+-AC_DEFUN([LB_PATH_SPL],
+-[
+-AC_ARG_WITH([spl],
+- AC_HELP_STRING([--with-spl=path], [set path to spl sources]),
+- [],[
+- if test x$enable_server = xyes && test x$enable_dist = xno; then
+- with_spl='yes'
+- else
+- with_spl='no'
+- fi
++dnl #
++dnl # Supported configure options. When no options are specified support
++dnl # for ZFS OSDs will be autodetected assuming server support is enabled.
++dnl # If the ZFS OSD cannot be built support for it is disabled and a
++dnl # warning is issued but the configure process is allowed to continue.
++dnl #
++dnl # --without-zfs - Disable zfs support.
++dnl # --with-zfs=no
++dnl #
++dnl # --with-zfs - Enable zfs support and attempt to autodetect the zfs
++dnl # --with-zfs=yes headers in one of the following places. Because zfs
++dnl # support was explicitly required if the headers cannot
++dnl # be located it is treated as a fatal error.
++dnl #
++dnl # * /var/lib/dkms/zfs/${VERSION}/build
++dnl # * /usr/src/zfs-${VERSION}/${LINUXRELEASE}
++dnl # * /usr/src/zfs-${VERSION}
++dnl # * ../spl/
++dnl # * $LINUX
++dnl #
++dnl # --with-zfs=path - Enable zfs support and use the zfs headers in the
++dnl # provided path. No autodetection is performed and
++dnl # if no headers are found this is a fatal error.
++dnl #
++dnl # --with-zfs-obj - When zfs support is enabled the object directory
++dnl # will be based on the --with-zfs directory. If this
++dnl # is detected incorrectly it can be explicitly
++dnl # specified using this option.
++dnl #
++dnl # --without-spl - Disable spl support.
++dnl # --with-spl=no
++dnl #
++dnl # --with-spl - Enable spl support and attempt to autodetect the spl
++dnl # --with-spl=yes headers in one of the following places in this order:
++dnl # * /var/lib/dkms/spl/${VERSION}/build
++dnl # * /usr/src/spl-${VERSION}/${LINUXRELEASE}
++dnl # * /usr/src/spl-${VERSION}
++dnl # * ../spl/
++dnl # * $LINUX
++dnl #
++dnl # --with-spl=path - Enable spl support and use the spl headers in the
++dnl # provided path. No autodetection is performed.
++dnl #
++dnl # --with-spl-obj - When spl support is enabled the object directory
++dnl # will be based on the --with-spl directory. If this
++dnl # is detected incorrectly it can be explicitly
++dnl # specified using this option.
++dnl #
++AC_DEFUN([LB_SPL], [
++ AC_ARG_WITH([spl],
++ AS_HELP_STRING([--with-spl=PATH],
++ [Path to spl source]),
++ [splsrc="$withval"])
++
++ AC_ARG_WITH([spl-obj],
++ AS_HELP_STRING([--with-spl-obj=PATH],
++ [Path to spl build objects]),
++ [splobj="$withval"])
++
++ dnl #
++ dnl # The existence of spl.release[.in] is used to identify a valid
++ dnl # source directory. In order of preference:
++ dnl #
++ splver=$(ls -1 /usr/src/ | grep -m1 spl | cut -f2 -d'-')
++ splsrc0="/var/lib/dkms/spl/${splver}/build"
++ splsrc1="/usr/src/spl-${splver}/${LINUXRELEASE}"
++ splsrc2="/usr/src/spl-${splver}"
++ splsrc3="../spl/"
++ splsrc4="$LINUX"
++
++ AC_MSG_CHECKING([spl source directory])
++ AS_IF([test -z "${splsrc}"], [
++ AS_IF([test -e "${splsrc0}/spl.release.in"], [
++ splsrc=${splsrc0}
++ ], [test -e "${splsrc1}/spl.release.in"], [
++ splsrc=${splsrc1}
++ ], [test -e "${splsrc2}/spl.release.in"], [
++ splsrc=${splsrc2}
++ ], [test -e "${splsrc3}/spl.release.in"], [
++ splsrc=$(readlink -f "${splsrc3}")
++ ], [test -e "${splsrc4}/spl.release.in"], [
++ splsrc=${splsrc4}
++ ], [
++ splsrc="[Not found]"
++ ])
+ ])
++ AC_MSG_RESULT([$splsrc])
+
+-case x$with_spl in
+- xno)
+- AC_MSG_ERROR([spl must be enabled when building zfs.])
+- ;;
+- xyes)
+- SPL_DIR=
+-
+- # Check ./spl
+- spl_src=$PWD/spl
+- if test -e "$spl_src"; then
+- SPL_DIR=$(readlink -f $spl_src)
+- else
+- # Check /usr/src/spl-*/$LINUXRELEASE
+- spl_src=$(ls -1d /usr/src/spl-*/$LINUXRELEASE \
+- 2>/dev/null | tail -1)
+- if test -e "$spl_src"; then
+- SPL_DIR=$(readlink -f $spl_src)
+- else
+- # Check ../spl
+- spl_src=$PWD/../spl
+- if test -e "$spl_src"; then
+- SPL_DIR=$(readlink -f $spl_src)
+- else
+- # Fatal spl required for zfs builds
+- AC_MSG_ERROR([Could not locate spl.])
+- fi
+- fi
+- fi
+-
+- ;;
+- *)
+- SPL_DIR=$(readlink -f $with_spl)
+- with_spl='yes'
+- ;;
+-esac
+-
+-AC_ARG_WITH([spl-obj],
+- AC_HELP_STRING([--with-spl-obj=path], [set path to spl objects]),
+- [
+- if test x$with_spl = xyes; then
+- SPL_OBJ="$withval"
+- fi
+- ],[
+- if test x$with_spl = xyes; then
+- SPL_OBJ=$SPL_DIR
+- fi
++ AS_IF([test ! -e "$splsrc/spl.release" &&
++ test ! -e "$splsrc/spl.release.in"], [
++ enable_zfs=no
+ ])
+
+-AC_MSG_CHECKING([spl source directory])
+-AC_MSG_RESULT([$SPL_DIR])
+-AC_SUBST(SPL_DIR)
+-
+-AC_MSG_CHECKING([spl object directory])
+-AC_MSG_RESULT([$SPL_OBJ])
+-AC_SUBST(SPL_OBJ)
+-
+-LB_SPL_SYMVERS
+-LB_SPL_RELEASE
+-])
++ dnl #
++ dnl # The existence of the spl_config.h is used to identify a valid
++ dnl # spl object directory. In many cases the object and source
++ dnl # directory are the same, however the objects may also reside
++ dnl # is a subdirectory named after the kernel version.
++ dnl #
++ AC_MSG_CHECKING([spl build directory])
++ AS_IF([test -z "$splobj"], [
++ AS_IF([test -e "${splsrc}/${LINUXRELEASE}/spl_config.h"], [
++ splobj="${splsrc}/${LINUXRELEASE}"
++ ], [test -e "${splsrc}/spl_config.h"], [
++ splobj="${splsrc}"
++ ], [
++ splobj="[Not found]"
++ ])
++ ])
++ AC_MSG_RESULT([$splobj])
+
+-#
+-# LB_SPL_BUILD
+-#
+-# Optionally configure/make the spl sources. If the sources are
+-# determined to reside in-tree this feature will automatically be
+-# enabled. If the sources are not in-tree it will be disabled.
+-# Use --enable-spl-build or --disable-spl-build if you need to
+-# override this behavior.
+-#
+-AC_DEFUN([LB_SPL_BUILD],
+-[
+-AC_ARG_ENABLE([spl-build],
+- AC_HELP_STRING([--enable-spl-build], [enable spl configure/make]),
+- [], [
+- SPL_DIR_INTREE=$(readlink -f $PWD/spl)
+- if test x$SPL_DIR = x$SPL_DIR_INTREE; then
+- enable_spl_build='yes'
+- else
+- enable_spl_build='no'
+- fi
++ AS_IF([test ! -e "$splobj/spl_config.h"], [
++ enable_zfs=no
+ ])
+
+-AC_MSG_CHECKING([whether to build spl])
+-if test x$enable_spl_build = xyes; then
+- AC_MSG_RESULT([$enable_spl_build])
++ dnl #
++ dnl # Verify the source version using SPL_META_VERSION in spl_config.h
++ dnl #
++ AS_IF([test x$enable_zfs = xyes], [
++ AC_MSG_CHECKING([spl source version])
++ AS_IF([fgrep -q SPL_META_VERSION $splobj/spl_config.h], [
++ splver=$((echo "#include <spl_config.h>";
++ echo "splver=SPL_META_VERSION-SPL_META_RELEASE") |
++ cpp -I $splobj |
++ grep "^splver=" | tr -d \" | cut -d= -f2)
++ ], [
++ splver="[Not found]"
++ enable_zfs=no
++ ])
++ AC_MSG_RESULT([$splver])
++ ])
+
+- LB_CHECK_FILE([$SPL_DIR/module/spl/spl-generic.c], [], [
+- AC_MSG_ERROR([Complete spl source must exist when building.])])
++ dnl #
++ dnl # Verify the modules systems exist by the expect name.
++ dnl #
++ AS_IF([test x$enable_zfs = xyes], [
++ AC_MSG_CHECKING([spl file name for module symbols])
++ AS_IF([test -r $splobj/$SYMVERFILE], [
++ splsym=$SYMVERFILE
++ ], [test -r $splobj/module/$SYMVERFILE], [
++ splsym=$SYMVERFILE
++ ], [
++ splsym="[Not found]"
++ enable_zfs=no
++ ])
++ AC_MSG_RESULT([$splsym])
++ ])
+
+- LB_CHECK_FILE([$SPL_DIR/configure], [], [
+- AC_MSG_ERROR([Complete spl source must exist when building.])])
++ SPL=${splsrc}
++ SPL_OBJ=${splobj}
++ SPL_VERSION=${splver}
++ SPL_SYMBOLS=${splsym}
+
+- SPL_SUBDIR="$SPL_DIR"
+- AC_SUBST(SPL_SUBDIR)
+- AC_CONFIG_SUBDIRS("spl")
+-else
+- enable_spl_build='no'
+- AC_MSG_RESULT([$enable_spl_build])
+-fi
++ AC_SUBST(SPL)
++ AC_SUBST(SPL_OBJ)
++ AC_SUBST(SPL_VERSION)
++ AC_SUBST(SPL_SYMBOLS)
+ ])
+
+-#
+-# LB_SPL_SYMVERS
+-#
+-AC_DEFUN([LB_SPL_SYMVERS],
+-[
+-AC_MSG_CHECKING([spl module symbols])
+-if test -r $SPL_OBJ/Module.symvers; then
+- SPL_SYMBOLS=Module.symvers
+-elif test -r $SPL_OBJ/Modules.symvers; then
+- SPL_SYMBOLS=Modules.symvers
+-elif test -r $SPL_OBJ/module/Module.symvers; then
+- SPL_SYMBOLS=Module.symvers
+-elif test -r $SPL_OBJ/module/Modules.symvers; then
+- SPL_SYMBOLS=Modules.symvers
+-else
+- SPL_SYMBOLS=$SYMVERFILE
+-fi
+-
+-AC_MSG_RESULT([$SPL_SYMBOLS])
+-AC_SUBST(SPL_SYMBOLS)
+-])
++AC_DEFUN([LB_ZFS], [
++ AC_ARG_WITH([zfs-obj],
++ AS_HELP_STRING([--with-zfs-obj=PATH],
++ [Path to zfs build objects]),
++ [zfsobj="$withval"])
++
++ dnl #
++ dnl # The existence of zfs.release[.in] is used to identify a valid
++ dnl # source directory. In order of preference:
++ dnl #
++ zfsver=$(ls -1 /usr/src/ | grep -m1 zfs | cut -f2 -d'-')
++ zfssrc0="/var/lib/dkms/zfs/${zfsver}/build"
++ zfssrc1="/usr/src/zfs-${zfsver}/${LINUXRELEASE}"
++ zfssrc2="/usr/src/zfs-${zfsver}"
++ zfssrc3="../zfs/"
++ zfssrc4="$LINUX"
+
+-#
+-# LB_SPL_RELEASE
+-#
+-AC_DEFUN([LB_SPL_RELEASE],
+-[
+-AC_MSG_CHECKING([spl source release])
+-if test -r $SPL_OBJ/spl_config.h; then
+- tmp_flags="$EXTRA_KCFLAGS"
+- EXTRA_KCFLAGS="-I$SPL_DIR $EXTRA_KCFLAGS"
+- LB_LINUX_TRY_MAKE([
+- #include <$SPL_OBJ/spl_config.h>
+- ],[
+- char *SPL_RELEASE;
+- SPL_RELEASE=SPL_META_VERSION;
+- ],[
+- $makerule LUSTRE_KERNEL_TEST=conftest.i
+- ],[
+- test -s build/conftest.i
+- ],[
+- eval $(grep "SPL_RELEASE=" build/conftest.i)
+- ],[
+- AC_MSG_RESULT([unknown])
+- AC_MSG_ERROR([Could not preprocess test program.])
++ AC_MSG_CHECKING([zfs source directory])
++ AS_IF([test -z "${zfssrc}"], [
++ AS_IF([test -e "${zfssrc0}/zfs.release.in"], [
++ zfssrc=${zfssrc0}
++ ], [test -e "${zfssrc1}/zfs.release.in"], [
++ zfssrc=${zfssrc1}
++ ], [test -e "${zfssrc2}/zfs.release.in"], [
++ zfssrc=${zfssrc2}
++ ], [test -e "${zfssrc3}/zfs.release.in"], [
++ zfssrc=$(readlink -f "${zfssrc3}")
++ ], [test -e "${zfssrc4}/zfs.release.in"], [
++ zfssrc=${zfssrc4}
++ ], [
++ zfssrc="[Not found]"
++ ])
+ ])
+- EXTRA_KCFLAGS="$tmp_flags"
+- rm build/conftest.i
+-elif test -r $SPL_DIR/META; then
+- SPL_RELEASE=$(awk '/Version/ { print [$]2 }' $SPL_DIR/META)
+-else
+- AC_MSG_RESULT([unknown])
+- AC_MSG_ERROR([Could not locate spl_config.h or META to check release.])
+-fi
+-
+-if test x$SPL_RELEASE = x; then
+- AC_MSG_RESULT([unknown])
+- AC_MSG_ERROR([Could not determine spl release.])
+-fi
+-
+-AC_MSG_RESULT([$SPL_RELEASE])
+-AC_SUBST(SPL_RELEASE)
+-])
+-
++ AC_MSG_RESULT([$zfssrc])
+
+-#
+-# LB_PATH_ZFS
+-#
+-# --without-zfs - Disable zfs support.
+-# --with-zfs=no
+-#
+-# --with-zfs - Enable zfs support and attempt to autodetect the zfs
+-# --with-zfs=yes headers in one of the following places in this order:
+-# * ./zfs
+-# * /usr/src/zfs-*/$LINUXRELEASE
+-# * ../zfs
+-#
+-# --with-zfs=path - Enable zfs support and use the zfs headers in the
+-# provided path. No autodetection is performed.
+-#
+-# --with-zfs-obj - When zfs support is enabled the object directory
+-# will be based on the --with-zfs directory. If this
+-# is detected incorrectly it can be explicitly
+-# specified using this option.
+-#
+-# NOTE: As with all external packages zfs is expected to already be
+-# configured and built. However, if the zfs tree is located in-tree
+-# (./zfs) then it will be configured and built recursively as part of
+-# the lustre build system.
+-#
+-AC_DEFUN([LB_PATH_ZFS],
+-[
+-AC_ARG_WITH([zfs],
+- AC_HELP_STRING([--with-zfs=path], [set path to zfs sources]),
+- [],[
+- if test x$enable_server = xyes && test x$enable_dist = xno; then
+- with_zfs='yes'
+- else
+- with_zfs='no'
+- fi
++ AS_IF([test ! -e "$zfssrc/zfs.release.in" &&
++ test ! -e "$zfssrc/zfs.release"], [
++ enable_zfs=no
+ ])
+
+-case x$with_zfs in
+- xno)
+- ZFS_DIR=
+- ;;
+- xyes)
+- ZFS_DIR=
+-
+- # Check ./zfs
+- zfs_src=$PWD/zfs
+- if test -e "$zfs_src"; then
+- ZFS_DIR=$(readlink -f $zfs_src)
+- else
+- # Check /usr/src/zfs-*/$LINUXRELEASE
+- zfs_src=$(ls -1d /usr/src/zfs-*/$LINUXRELEASE \
+- 2>/dev/null|tail -1)
+- if test -e "$zfs_src"; then
+- ZFS_DIR=$(readlink -f $zfs_src)
+- else
+- # Check ../zfs
+- zfs_src=$PWD/../zfs
+- if test -e "$zfs_src"; then
+- ZFS_DIR=$(readlink -f $zfs_src)
+- else
+- # Disable zfs failed to detect sources
+- with_zfs='no'
+- fi
+- fi
+- fi
+- ;;
+- *)
+- ZFS_DIR=$(readlink -f $with_zfs)
+- with_zfs='yes'
+- ;;
+-esac
+-
+-AC_MSG_CHECKING([whether to enable zfs])
+-AC_MSG_RESULT([$with_zfs])
+-
+-if test x$with_zfs = xyes; then
+- AC_MSG_CHECKING([for location of zfs library headers])
+- if test -e "$ZFS_DIR/include/libzfs.h"; then
+- EXTRA_LIBZFS_INCLUDE="$EXTRA_LIBZFS_INCLUDE -I $ZFS_DIR/lib/libspl/include -I $ZFS_DIR/include"
+- AC_MSG_RESULT([$ZFS_DIR])
+- elif test -e "$ZFS_DIR/libzfs/libzfs.h"; then
+- EXTRA_LIBZFS_INCLUDE="$EXTRA_LIBZFS_INCLUDE -I $ZFS_DIR/libspl -I $ZFS_DIR/libzfs"
+- AC_MSG_RESULT([$ZFS_DIR])
+- elif test -e "/usr/include/libzfs/libzfs.h"; then
+- AC_MSG_RESULT([/usr/include])
+- EXTRA_LIBZFS_INCLUDE="$EXTRA_LIBZFS_INCLUDE -I /usr/include/libspl -I /usr/include/libzfs"
+- else
+- AC_MSG_RESULT([unknown])
+- AC_MSG_ERROR([Could not locate zfs library headers.])
+- fi
+- AC_SUBST(EXTRA_LIBZFS_INCLUDE)
+-fi
+-
+-AC_ARG_WITH([zfs-obj],
+- AC_HELP_STRING([--with-zfs-obj=path], [set path to zfs objects]),
+- [
+- if test x$with_zfs = xyes; then
+- ZFS_OBJ="$withval"
+- fi
+- ],[
+- if test x$with_zfs = xyes; then
+- ZFS_OBJ=$ZFS_DIR
+- fi
++ dnl #
++ dnl # The existence of the zfs_config.h is used to identify a valid
++ dnl # zfs object directory. In many cases the object and source
++ dnl # directory are the same, however the objects may also reside
++ dnl # is a subdirectory named after the kernel version.
++ dnl #
++ AC_MSG_CHECKING([zfs build directory])
++ AS_IF([test -z "$zfsobj"], [
++ AS_IF([test -e "${zfssrc}/${LINUXRELEASE}/zfs_config.h"], [
++ zfsobj="${zfssrc}/${LINUXRELEASE}"
++ ], [test -e "${zfssrc}/zfs_config.h"], [
++ zfsobj="${zfssrc}"
++ ], [
++ zfsobj="[Not found]"
++ ])
+ ])
+
+-if test x$with_zfs = xyes; then
+- LB_ZFS_DEFINE_OPTIONS
+-
+- AC_MSG_CHECKING([zfs source directory])
+- AC_MSG_RESULT([$ZFS_DIR])
+- AC_SUBST(ZFS_DIR)
+-
+- AC_MSG_CHECKING([zfs object directory])
+- AC_MSG_RESULT([$ZFS_OBJ])
+- AC_SUBST(ZFS_OBJ)
++ AC_MSG_RESULT([$zfsobj])
++ AS_IF([test ! -e "$zfsobj/zfs_config.h"], [
++ enable_zfs=no
++ ])
+
+- LB_ZFS_SYMVERS
+- LB_ZFS_RELEASE
++ dnl #
++ dnl # Verify the source version using SPL_META_VERSION in spl_config.h
++ dnl #
++ AS_IF([test x$enable_zfs = xyes], [
++ AC_MSG_CHECKING([zfs source version])
++ AS_IF([fgrep -q ZFS_META_VERSION $zfsobj/zfs_config.h], [
++ zfsver=$((echo "#include <zfs_config.h>";
++ echo "zfsver=ZFS_META_VERSION-ZFS_META_RELEASE") |
++ cpp -I $zfsobj |
++ grep "^zfsver=" | tr -d \" | cut -d= -f2)
++ ],[
++ zfsver="[Not found]"
++ enable_zfs=no
++ ])
++ AC_MSG_RESULT([$zfsver])
++ ])
+
+- LB_PATH_SPL
++ dnl #
++ dnl # Verify the modules systems exist by the expect name.
++ dnl #
++ AS_IF([test x$enable_zfs = xyes], [
++ AC_MSG_CHECKING([zfs file name for module symbols])
++ AS_IF([test -r $zfsobj/$SYMVERFILE], [
++ zfssym=$SYMVERFILE
++ ], [test -r $zfsobj/module/$SYMVERFILE], [
++ zfssym=$SYMVERFILE
++ ], [
++ zfssym="[Not found]"
++ enable_zfs=no
++ ])
++ AC_MSG_RESULT([$zfssym])
++ ])
+
+- LB_SPL_BUILD
+- LB_ZFS_BUILD
+-fi
++ ZFS=${zfssrc}
++ ZFS_OBJ=${zfsobj}
++ ZFS_VERSION=${zfsver}
++ ZFS_SYMBOLS=${zfssym}
+
+-AM_CONDITIONAL(SPL_BUILD, test x$enable_spl_build = xyes)
+-AM_CONDITIONAL(ZFS_BUILD, test x$enable_zfs_build = xyes)
+-AM_CONDITIONAL(ZFS_ENABLED, test x$with_zfs = xyes)
++ AC_SUBST(ZFS)
++ AC_SUBST(ZFS_OBJ)
++ AC_SUBST(ZFS_VERSION)
++ AC_SUBST(ZFS_SYMBOLS)
+ ])
+
+-#
+-# LB_ZFS_BUILD
+-#
+-# Optionally configure/make the zfs sources. If the sources are
+-# determined to reside in-tree this feature will automatically be
+-# enabled. If the sources are not in-tree it will be disabled.
+-# Use --enable-zfs-build or --disable-zfs-build if you need to
+-# override this behavior.
+-#
+-AC_DEFUN([LB_ZFS_BUILD],
+-[
+-AC_ARG_ENABLE([zfs-build],
+- AC_HELP_STRING([--enable-zfs-build], [enable zfs configure/make]),
+- [], [
+- ZFS_DIR_INTREE=$(readlink -f $PWD/zfs)
+- if test x$ZFS_DIR = x$ZFS_DIR_INTREE; then
+- enable_zfs_build='yes'
+- else
+- enable_zfs_build='no'
+- fi
++AC_DEFUN([LB_ZFS_USER], [
++ dnl #
++ dnl # Detect user space zfs development headers.
++ dnl #
++ AC_MSG_CHECKING([zfs devel headers])
++ AS_IF([test -d /usr/include/libzfs && test -d /usr/include/libspl], [
++ zfslib="-I /usr/include/libspl -I /usr/include/libzfs"
++ ], [
++ zfslib="[Not found]"
++ enable_zfs=no
+ ])
++ AC_MSG_RESULT([$zfslib])
+
+-AC_MSG_CHECKING([whether to build zfs])
+-if test x$enable_zfs_build = xyes; then
+- AC_MSG_RESULT([$enable_zfs_build])
+-
+- LB_CHECK_FILE([$ZFS_DIR/module/zfs/dmu.c], [], [
+- AC_MSG_ERROR([Complete zfs sources must exist when building.])])
+-
+- LB_CHECK_FILE([$ZFS_DIR/configure], [], [
+- AC_MSG_ERROR([Complete zfs sources must exist when building.])])
+-
+- ZFS_SUBDIR="$ZFS_DIR"
+- AC_SUBST(ZFS_SUBDIR)
+- AC_CONFIG_SUBDIRS("zfs")
+-
+- ac_configure_args="$ac_configure_args --with-spl=$SPL_DIR"
+- ac_configure_args="$ac_configure_args --with-spl-obj=$SPL_OBJ"
+-else
+- enable_zfs_build='no'
+- AC_MSG_RESULT([$enable_zfs_build])
+-fi
++ ZFS_LIBZFS_INCLUDE=${zfslib}
++ AC_SUBST(ZFS_LIBZFS_INCLUDE)
+ ])
+
+-#
+-# LB_ZFS_SYMVERS
+-#
+-AC_DEFUN([LB_ZFS_SYMVERS],
+-[
+-AC_MSG_CHECKING([zfs module symbols])
+-if test -r $ZFS_OBJ/Module.symvers; then
+- ZFS_SYMBOLS=Module.symvers
+-elif test -r $ZFS_OBJ/Modules.symvers; then
+- ZFS_SYMBOLS=Modules.symvers
+-elif test -r $ZFS_OBJ/module/Module.symvers; then
+- ZFS_SYMBOLS=Module.symvers
+-elif test -r $ZFS_OBJ/module/Modules.symvers; then
+- ZFS_SYMBOLS=Modules.symvers
+-else
+- ZFS_SYMBOLS=$SYMVERFILE
+-fi
+-
+-AC_MSG_RESULT([$ZFS_SYMBOLS])
+-AC_SUBST(ZFS_SYMBOLS)
+-])
+-
+-#
+-# LB_ZFS_RELEASE
+-#
+-AC_DEFUN([LB_ZFS_RELEASE],
+-[
+-AC_MSG_CHECKING([zfs source release])
+-if test -r $ZFS_OBJ/zfs_config.h; then
+- tmp_flags="$EXTRA_KCFLAGS"
+- EXTRA_KCFLAGS="-I$ZFS_OBJ $EXTRA_KCFLAGS"
+- LB_LINUX_TRY_MAKE([
+- #include <$ZFS_OBJ/zfs_config.h>
+- ],[
+- char *ZFS_RELEASE;
+- ZFS_RELEASE=ZFS_META_VERSION;
+- ],[
+- $makerule LUSTRE_KERNEL_TEST=conftest.i
+- ],[
+- test -s build/conftest.i
+- ],[
+- eval $(grep "ZFS_RELEASE=" build/conftest.i)
+- ],[
+- AC_MSG_RESULT([unknown])
+- AC_MSG_ERROR([Could not preprocess test program.])
++AC_DEFUN([LB_PATH_ZFS], [
++ AC_ARG_WITH([zfs],
++ [AS_HELP_STRING([--with-zfs=PATH], [Path to zfs source])],
++ [
++ AS_IF([test x$withval = xno], [
++ enable_zfs=no
++ require_zfs=no
++ ], [test x$withval = xyes], [
++ enable_zfs=yes
++ require_zfs=yes
++ ], [
++ enable_zfs=yes
++ require_zfs=yes
++ zfssrc="$withval"
++ ])
++ ], [
++ AS_IF([test x$enable_server = xyes &&
++ test x$enable_dist = xno], [
++ require_zfs=no
++ enable_zfs=yes
++ ], [
++ require_zfs=no
++ enable_zfs=no
++ ])
++ ])
++
++ AC_MSG_CHECKING([whether to enable zfs])
++ AC_MSG_RESULT([$enable_zfs])
++
++ AS_IF([test x$enable_zfs = xyes], [
++ AS_IF([test x$enable_modules = xyes], [
++ LB_SPL
++ LB_ZFS
++ ])
++
++ LB_ZFS_USER
++
++ dnl #
++ dnl # enable_zfs will be set to no in LB_SPL or LB_ZFS if
++ dnl # one of more of the build requirements is not met.
++ dnl #
++ AS_IF([test x$enable_zfs = xyes], [
++ AC_DEFINE(HAVE_ZFS_OSD, 1, Enable zfs osd)
++ ],[
++ AS_IF([test x$require_zfs = xyes], [
++ AC_MSG_ERROR([
++
++Required zfs osd cannot be built due to missing zfs development headers.
++
++Support for zfs can be enabled by downloading the required packages for your
++distribution. See http://zfsonlinux.org/ to determine is zfs is supported by
++your distribution.
++ ])
++ ], [
++ AC_MSG_WARN([
++
++Disabling optional zfs osd due to missing development headers.
++
++Support for zfs can be enabled by downloading the required packages for your
++distribution. See http://zfsonlinux.org/ to determine is zfs is supported by
++your distribution.
++ ])
++ ])
++ ])
+ ])
+- EXTRA_KCFLAGS="$tmp_flags"
+- rm build/conftest.i
+-elif test -r $ZFS_DIR/META; then
+- ZFS_RELEASE=$(awk '/Version/ { print [$]2 }' $ZFS_DIR/META)
+-else
+- AC_MSG_RESULT([unknown])
+- AC_MSG_ERROR([Could not locate zfs_config.h or META to check release.])
+-fi
+-
+-if test x$ZFS_RELEASE = x; then
+- AC_MSG_RESULT([unknown])
+- AC_MSG_ERROR([Could not determine zfs release.])
+-fi
+-
+-AC_MSG_RESULT([$ZFS_RELEASE])
+-AC_SUBST(ZFS_RELEASE)
+-])
+
+-#
+-# LB_ZFS_DEFINE_OPTIONS
+-#
+-AC_DEFUN([LB_ZFS_DEFINE_OPTIONS],
+-[
+-AC_DEFINE(HAVE_ZFS_OSD, 1, Enable zfs osd)
++ AM_CONDITIONAL(ZFS_ENABLED, test x$enable_zfs = xyes)
+ ])
+diff --git a/contrib/lbuild/lbuild b/contrib/lbuild/lbuild
+index f389505..3eda63f 100755
+--- a/contrib/lbuild/lbuild
++++ b/contrib/lbuild/lbuild
+@@ -1020,6 +1020,8 @@ build_spl_zfs() {
+
+ pushd $pkg || return 255
+
++ sh autogen.sh || return 255
++
+ # XXX - _having_ to give a package a kernel just to have it configure
+ # enough to do a "make dist" is truely bogus!
+ if ! ./configure --with-linux=${LINUX} \
+diff --git a/lustre.spec.in b/lustre.spec.in
+index edd02f5..11ff302 100644
+--- a/lustre.spec.in
++++ b/lustre.spec.in
+@@ -115,7 +115,7 @@ backing store of a Lustre server.
+ %if %{build_lustre_osd_zfs}
+ %package osd-zfs
+ Summary: osd-zfs is the mandatory glue for ZFS support in Lustre.
+-Requires: lustre-modules = %{version}, zfs-modules
++Requires: lustre-modules = %{version}, zfs-kmod
+ Provides: lustre-osd
+ Group: Development/Kernel
+
+diff --git a/lustre/osd-zfs/Makefile.in b/lustre/osd-zfs/Makefile.in
+index 0a2dceb..7def377 100644
+--- a/lustre/osd-zfs/Makefile.in
++++ b/lustre/osd-zfs/Makefile.in
+@@ -2,9 +2,8 @@ MODULES := osd_zfs
+ osd_zfs-objs := osd_handler.o osd_lproc.o udmu.o osd_quota.o
+ osd_zfs-objs += osd_object.o osd_io.o osd_oi.o osd_xattr.o osd_index.o
+
+-EXTRA_PRE_CFLAGS += -I@SPL_DIR@ -I@SPL_DIR@/include
+ EXTRA_PRE_CFLAGS += -include @SPL_OBJ@/spl_config.h
+-EXTRA_PRE_CFLAGS += -I@ZFS_OBJ@ -I@ZFS_OBJ@/include
+ EXTRA_PRE_CFLAGS += -include @ZFS_OBJ@/zfs_config.h
++EXTRA_PRE_CFLAGS += -I@SPL@ -I@SPL@/include -I@ZFS@ -I@ZFS@/include
+
+ @INCLUDE_RULES@
+diff --git a/lustre/utils/Makefile.am b/lustre/utils/Makefile.am
+index bc8d716..6ee11c6 100644
+--- a/lustre/utils/Makefile.am
++++ b/lustre/utils/Makefile.am
+@@ -132,7 +132,7 @@ endif
+ if ZFS_ENABLED
+ mount_lustre_SOURCES += mount_utils_zfs.c
+ mount_lustre_CPPFLAGS = -DHAVE_IOCTL_IN_UNISTD_H
+-mount_lustre_CPPFLAGS += $(EXTRA_LIBZFS_INCLUDE)
++mount_lustre_CPPFLAGS += $(ZFS_LIBZFS_INCLUDE)
+ mount_lustre_LDFLAGS = -pthread -rdynamic -ldl
+ endif
+
+@@ -148,7 +148,7 @@ endif
+ if ZFS_ENABLED
+ mkfs_lustre_SOURCES += mount_utils_zfs.c
+ mkfs_lustre_CPPFLAGS += -DHAVE_IOCTL_IN_UNISTD_H
+-mkfs_lustre_CPPFLAGS += $(EXTRA_LIBZFS_INCLUDE)
++mkfs_lustre_CPPFLAGS += $(ZFS_LIBZFS_INCLUDE)
+ mkfs_lustre_LDFLAGS = -pthread -rdynamic -ldl
+ endif
+
+@@ -162,7 +162,7 @@ endif
+ if ZFS_ENABLED
+ tunefs_lustre_SOURCES += mount_utils_zfs.c
+ tunefs_lustre_CPPFLAGS += -DHAVE_IOCTL_IN_UNISTD_H
+-tunefs_lustre_CPPFLAGS += $(EXTRA_LIBZFS_INCLUDE)
++tunefs_lustre_CPPFLAGS += $(ZFS_LIBZFS_INCLUDE)
+ tunefs_lustre_LDFLAGS = -pthread -rdynamic -ldl
+ endif
+
+--
+1.8.1.5
+
diff --git a/sys-cluster/lustre/lustre-9999.ebuild b/sys-cluster/lustre/lustre-9999.ebuild
index 975bc7697..5a783bde9 100644
--- a/sys-cluster/lustre/lustre-9999.ebuild
+++ b/sys-cluster/lustre/lustre-9999.ebuild
@@ -25,8 +25,9 @@ DEPEND="
readline? ( sys-libs/readline )
tcpd? ( sys-apps/tcp-wrappers )
server? (
- >=sys-kernel/spl-0.6.0_rc14-r2
- >=sys-fs/zfs-kmod-0.6.0_rc14-r4
+ >=sys-kernel/spl-0.6.1
+ >=sys-fs/zfs-kmod-0.6.1
+ >=sys-fs/zfs-0.6.1
)
"
RDEPEND="${DEPEND}"
@@ -40,10 +41,9 @@ PATCHES=(
"${FILESDIR}/0006-LU-2850-kernel-3.8-upstream-removes-vmtruncate.patch"
"${FILESDIR}/0007-LU-2850-kernel-3.8-upstream-kills-daemonize.patch"
"${FILESDIR}/0008-LU-2987-llite-rcu-free-inode.patch"
- "${FILESDIR}/0009-LU-3011-ubuntu-Fix-build-failures-on-Ubuntu-12.04.patch"
- "${FILESDIR}/0010-LU-3077-build-fix-warnings-in-client-modules.patch"
- "${FILESDIR}/0011-LU-2850-kernel-3.9-hlist_for_each_entry-uses-3-args.patch"
- "${FILESDIR}/0012-LU-2850-kernel-f_vfsmnt-replaced-by-f_path.mnt.patch"
+ "${FILESDIR}/0009-LU-2850-kernel-3.9-hlist_for_each_entry-uses-3-args.patch"
+ "${FILESDIR}/0010-LU-2850-kernel-f_vfsmnt-replaced-by-f_path.mnt.patch"
+ "${FILESDIR}/0011-LU-3117-build-zfs-0.6.1-kmod-dkms-compatibility.patch"
)
pkg_setup() {