summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRichard Yao <ryao@gentoo.org>2012-08-22 07:31:12 +0000
committerRichard Yao <ryao@gentoo.org>2012-08-22 07:31:12 +0000
commitc40ce5af5965be30c5fec2e2b983743f215026dd (patch)
tree852b2d81e49c9103be25a475d1e82ca74ff13c95 /sys-fs/zfs
parentEbuild to provide kernel module for sys-fs/zfs (diff)
downloadgentoo-2-c40ce5af5965be30c5fec2e2b983743f215026dd.tar.gz
gentoo-2-c40ce5af5965be30c5fec2e2b983743f215026dd.tar.bz2
gentoo-2-c40ce5af5965be30c5fec2e2b983743f215026dd.zip
Split kernel module into sys-fs/zfs-kmod
(Portage version: 2.1.11.9/cvs/Linux x86_64)
Diffstat (limited to 'sys-fs/zfs')
-rw-r--r--sys-fs/zfs/ChangeLog16
-rw-r--r--sys-fs/zfs/files/zfs-0.6.0_rc9-bsd-init.patch39
-rw-r--r--sys-fs/zfs/files/zfs-0.6.0_rc9-fix-32-bit-warnings.patch43
-rw-r--r--sys-fs/zfs/files/zfs-0.6.0_rc9-hardened-3.3-and-later-support.patch37
-rw-r--r--sys-fs/zfs/files/zfs-0.6.0_rc9-hardened-support.patch345
-rw-r--r--sys-fs/zfs/files/zfs-0.6.0_rc9-linux-3.5-support.patch183
-rw-r--r--sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-1-of-3.patch44
-rw-r--r--sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-2-of-3.patch56
-rw-r--r--sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-3-of-3.patch70
-rw-r--r--sys-fs/zfs/metadata.xml2
-rw-r--r--sys-fs/zfs/zfs-0.6.0_rc10-r1.ebuild (renamed from sys-fs/zfs/zfs-0.6.0_rc10.ebuild)47
-rw-r--r--sys-fs/zfs/zfs-0.6.0_rc9-r6.ebuild157
-rw-r--r--sys-fs/zfs/zfs-9999.ebuild47
13 files changed, 32 insertions, 1054 deletions
diff --git a/sys-fs/zfs/ChangeLog b/sys-fs/zfs/ChangeLog
index 52ff0b46453e..3aba72855383 100644
--- a/sys-fs/zfs/ChangeLog
+++ b/sys-fs/zfs/ChangeLog
@@ -1,6 +1,20 @@
# ChangeLog for sys-fs/zfs
# Copyright 1999-2012 Gentoo Foundation; Distributed under the GPL v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/ChangeLog,v 1.44 2012/08/15 23:04:21 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/ChangeLog,v 1.45 2012/08/22 07:31:11 ryao Exp $
+
+*zfs-0.6.0_rc10-r1 (22 Aug 2012)
+
+ 22 Aug 2012; Richard Yao <ryao@gentoo.org> +zfs-0.6.0_rc10-r1.ebuild,
+ -files/zfs-0.6.0_rc9-bsd-init.patch,
+ -files/zfs-0.6.0_rc9-fix-32-bit-warnings.patch,
+ -files/zfs-0.6.0_rc9-hardened-3.3-and-later-support.patch,
+ -files/zfs-0.6.0_rc9-hardened-support.patch,
+ -files/zfs-0.6.0_rc9-linux-3.5-support.patch,
+ -files/zfs-0.6.0_rc9-remove-pfmalloc-1-of-3.patch,
+ -files/zfs-0.6.0_rc9-remove-pfmalloc-2-of-3.patch,
+ -files/zfs-0.6.0_rc9-remove-pfmalloc-3-of-3.patch, -zfs-0.6.0_rc10.ebuild,
+ -zfs-0.6.0_rc9-r6.ebuild, metadata.xml, zfs-9999.ebuild:
+ Split kernel module into sys-fs/zfs-kmod
*zfs-0.6.0_rc10 (15 Aug 2012)
diff --git a/sys-fs/zfs/files/zfs-0.6.0_rc9-bsd-init.patch b/sys-fs/zfs/files/zfs-0.6.0_rc9-bsd-init.patch
deleted file mode 100644
index 0d8fc1da1a55..000000000000
--- a/sys-fs/zfs/files/zfs-0.6.0_rc9-bsd-init.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-commit 0ac83722a09ccb15067cad91217103474b58dadf
-Author: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Tue Jul 10 09:27:09 2012 -0400
-
- Relicense zfs.gentoo.in from GPLv2 to 2-clause BSD
-
- As the Gentoo sys-fs/zfs maintainer, I receive license compatibility
- questions and at times, those questions can be harassing. I feel that
- the presence of the GPL in Gentoo's package metadata promotes such
- questions. zfs.gentoo.in is the only GPLv2 licensed file in ZFS, so I
- have taken the liberty of contacting all contributors to this file to
- request permission to relicense it.
-
- All of the contributors to this file have agreed to relicense it under
- the 2-clause BSD license. I have added their Signed-offs to this commit,
- in order of first contribution. Thankyou everyone for being so
- understanding.
-
- Signed-off-by: devsk <devsku@gmail.com>
- Signed-off-by: Alexey Shvetsov <alexxy@gentoo.org>
- Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
- Signed-off-by: Andrew Tselischev <andrewtselischev@gmail.com>
- Signed-off-by: Zachary Bedell <zac@thebedells.org>
- Signed-off-by: Gunnar Beutner <gunnar@beutner.name>
- Signed-off-by: Kyle Fuller <inbox@kylefuller.co.uk>
- Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
-
-diff --git a/etc/init.d/zfs.gentoo.in b/etc/init.d/zfs.gentoo.in
-index 957be99..df883cf 100644
---- a/etc/init.d/zfs.gentoo.in
-+++ b/etc/init.d/zfs.gentoo.in
-@@ -1,6 +1,6 @@
- #!/sbin/runscript
- # Copyright 1999-2011 Gentoo Foundation
--# Distributed under the terms of the GNU General Public License v2
-+# Released under the 2-clause BSD license.
- # $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/files/zfs,v 0.9 2011/04/30 10:13:43 devsk Exp $
-
- depend()
diff --git a/sys-fs/zfs/files/zfs-0.6.0_rc9-fix-32-bit-warnings.patch b/sys-fs/zfs/files/zfs-0.6.0_rc9-fix-32-bit-warnings.patch
deleted file mode 100644
index 8b487c354537..000000000000
--- a/sys-fs/zfs/files/zfs-0.6.0_rc9-fix-32-bit-warnings.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 99aa2c28b1c96de2feee9a8edcbbe101100029c2 Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Mon, 9 Jul 2012 19:41:28 -0400
-Subject: [PATCH] Use ULL suffix in constants
-
-The lack of the ULL suffix causes warnings such as the following on
-32-bit systems:
-
-In function 'zfsctl_is_snapdir':
-zfs-0.6.0//module/zfs/zfs_ctldir.c:151: warning: integer constant is too
-large for 'long' type
-
-We add the ULL suffix to fix that.
-
-This closes issue #813.
-
-Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
----
- include/sys/zfs_ctldir.h | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
-diff --git a/include/sys/zfs_ctldir.h b/include/sys/zfs_ctldir.h
-index e598529..0a3c142 100644
---- a/include/sys/zfs_ctldir.h
-+++ b/include/sys/zfs_ctldir.h
-@@ -103,10 +103,10 @@ extern int zfsctl_shares_lookup(struct inode *dip, char *name,
- * However, they should be as large as possible to avoid conflicts
- * with the objects which are assigned monotonically by the dmu.
- */
--#define ZFSCTL_INO_ROOT 0x0000FFFFFFFFFFFF
--#define ZFSCTL_INO_SHARES 0x0000FFFFFFFFFFFE
--#define ZFSCTL_INO_SNAPDIR 0x0000FFFFFFFFFFFD
--#define ZFSCTL_INO_SNAPDIRS 0x0000FFFFFFFFFFFC
-+#define ZFSCTL_INO_ROOT 0x0000FFFFFFFFFFFFULL
-+#define ZFSCTL_INO_SHARES 0x0000FFFFFFFFFFFEULL
-+#define ZFSCTL_INO_SNAPDIR 0x0000FFFFFFFFFFFDULL
-+#define ZFSCTL_INO_SNAPDIRS 0x0000FFFFFFFFFFFCULL
-
- #define ZFSCTL_EXPIRE_SNAPSHOT 300
-
---
-1.7.10
-
diff --git a/sys-fs/zfs/files/zfs-0.6.0_rc9-hardened-3.3-and-later-support.patch b/sys-fs/zfs/files/zfs-0.6.0_rc9-hardened-3.3-and-later-support.patch
deleted file mode 100644
index 5e6cb4e8af95..000000000000
--- a/sys-fs/zfs/files/zfs-0.6.0_rc9-hardened-3.3-and-later-support.patch
+++ /dev/null
@@ -1,37 +0,0 @@
-commit 91d3b3c46473ee8a7f7dc8177b80fbece3f5ac94
-Author: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Thu Jul 19 18:37:56 2012 -0400
-
- Fix NULL pointer dereference on PaX/GRSecurity patched Linux 3.3 and later kernels
-
- Support for PaX/GRSecurity patched kernels was developed against Linux
- 3.2. Unfortunately, an autotools check introduced for a Linux 3.3 API
- fails on PaX/GRSecurity patched kernels. This causes the module to be
- built against the Linux 3.2 ABI, which results in a NULL pointer
- dereference at runtime.
-
- Closes zfsonlinux/zfs#794 and zfsonlinux/zfs#809
-
- Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
-
-diff --git a/config/kernel-show-options.m4 b/config/kernel-show-options.m4
-index 1bddb0a..67d683c 100644
---- a/config/kernel-show-options.m4
-+++ b/config/kernel-show-options.m4
-@@ -6,11 +6,12 @@ AC_DEFUN([ZFS_AC_KERNEL_SHOW_OPTIONS], [
-
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-- ],[
-- int (*show_options) (struct seq_file *, struct dentry *) = NULL;
-- struct super_operations sops __attribute__ ((unused));
-
-- sops.show_options = show_options;
-+ int show_options (struct seq_file * x, struct dentry * y) { return 0; };
-+ static struct super_operations sops __attribute__ ((unused)) = {
-+ .show_options = show_options,
-+ };
-+ ],[
- ],[
- AC_MSG_RESULT([yes])
- AC_DEFINE(HAVE_SHOW_OPTIONS_WITH_DENTRY, 1,
diff --git a/sys-fs/zfs/files/zfs-0.6.0_rc9-hardened-support.patch b/sys-fs/zfs/files/zfs-0.6.0_rc9-hardened-support.patch
deleted file mode 100644
index 882fb7cd918b..000000000000
--- a/sys-fs/zfs/files/zfs-0.6.0_rc9-hardened-support.patch
+++ /dev/null
@@ -1,345 +0,0 @@
-From 7f7bc416f3153fddecec85c0bbfd4d53fe9efc69 Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Wed, 30 May 2012 23:25:31 -0400
-Subject: [PATCH] Fix build failures on PaX/GRSecurity patched kernels
-
-Gentoo Hardened kernels include the PaX/GRSecurity patches. They use a
-dialect of C that relies on a GCC plugin. In particular, struct
-file_operations has been marked do_const in the PaX/GRSecurity dialect,
-which causes GCC to consider all instances of it as const. This caused
-failures in the autotools checks and the ZFS source code.
-
-To address this, we modify the autotools checks to take into account
-differences between the PaX C dialect and the regular C dialect. We also
-modify struct zfs_acl's z_ops member to be a pointer to a function
-pointer table and make a char * pointer const. This avoids issues in the
-PaX/GRSecurity dialect.
-
-Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
----
- config/kernel-evict-inode.m4 | 6 ++---
- config/kernel-fallocate.m4 | 21 +++++++++++++++
- config/kernel-fsync.m4 | 60 ++++++++++++++++++++++++++++++++++++++++++
- include/sys/zfs_acl.h | 2 +-
- module/zfs/zfs_acl.c | 50 +++++++++++++++++------------------
- module/zfs/zpl_inode.c | 2 +-
- 6 files changed, 111 insertions(+), 30 deletions(-)
-
-diff --git a/config/kernel-evict-inode.m4 b/config/kernel-evict-inode.m4
-index 0700792..683cedb 100644
---- a/config/kernel-evict-inode.m4
-+++ b/config/kernel-evict-inode.m4
-@@ -7,12 +7,12 @@ AC_DEFUN([ZFS_AC_KERNEL_EVICT_INODE], [
- AC_MSG_CHECKING([whether sops->evict_inode() exists])
- ZFS_LINUX_TRY_COMPILE([
- #include <linux/fs.h>
-- ],[
-- void (*evict_inode) (struct inode *) = NULL;
-- struct super_operations sops __attribute__ ((unused)) = {
-+ void evict_inode (struct inode * t) { return; }
-+ static struct super_operations sops __attribute__ ((unused)) = {
- .evict_inode = evict_inode,
- };
- ],[
-+ ],[
- AC_MSG_RESULT(yes)
- AC_DEFINE(HAVE_EVICT_INODE, 1, [sops->evict_inode() exists])
- ],[
-diff --git a/config/kernel-fallocate.m4 b/config/kernel-fallocate.m4
-index d551276..6ac5ae6 100644
---- a/config/kernel-fallocate.m4
-+++ b/config/kernel-fallocate.m4
-@@ -39,10 +39,31 @@ AC_DEFUN([ZFS_AC_KERNEL_INODE_FALLOCATE], [
- ])
-
- dnl #
-+dnl # PaX Linux 2.6.38 - 3.x API
-+dnl #
-+AC_DEFUN([ZFS_AC_PAX_KERNEL_FILE_FALLOCATE], [
-+ AC_MSG_CHECKING([whether fops->fallocate() exists])
-+ ZFS_LINUX_TRY_COMPILE([
-+ #include <linux/fs.h>
-+ ],[
-+ long (*fallocate) (struct file *, int, loff_t, loff_t) = NULL;
-+ struct file_operations_no_const fops __attribute__ ((unused)) = {
-+ .fallocate = fallocate,
-+ };
-+ ],[
-+ AC_MSG_RESULT(yes)
-+ AC_DEFINE(HAVE_FILE_FALLOCATE, 1, [fops->fallocate() exists])
-+ ],[
-+ AC_MSG_RESULT(no)
-+ ])
-+])
-+
-+dnl #
- dnl # The fallocate callback was moved from the inode_operations
- dnl # structure to the file_operations structure.
- dnl #
- AC_DEFUN([ZFS_AC_KERNEL_FALLOCATE], [
- ZFS_AC_KERNEL_FILE_FALLOCATE
- ZFS_AC_KERNEL_INODE_FALLOCATE
-+ ZFS_AC_PAX_KERNEL_FILE_FALLOCATE
- ])
-diff --git a/config/kernel-fsync.m4 b/config/kernel-fsync.m4
-index 862b897..2a2b4ab 100644
---- a/config/kernel-fsync.m4
-+++ b/config/kernel-fsync.m4
-@@ -55,9 +55,69 @@ AC_DEFUN([ZFS_AC_KERNEL_FSYNC_RANGE], [
- ])
- ])
-
-+dnl #
-+dnl # PaX Linux 2.6.x - 2.6.34 API
-+dnl #
-+AC_DEFUN([ZFS_AC_PAX_KERNEL_FSYNC_WITH_DENTRY], [
-+ ZFS_LINUX_TRY_COMPILE([
-+ #include <linux/fs.h>
-+ ],[
-+ int (*fsync) (struct file *, struct dentry *, int) = NULL;
-+ file_operations_no_const fops __attribute__ ((unused));
-+
-+ fops.fsync = fsync;
-+ ],[
-+ AC_MSG_RESULT([dentry])
-+ AC_DEFINE(HAVE_FSYNC_WITH_DENTRY, 1,
-+ [fops->fsync() with dentry])
-+ ],[
-+ ])
-+])
-+
-+dnl #
-+dnl # PaX Linux 2.6.35 - Linux 3.0 API
-+dnl #
-+AC_DEFUN([ZFS_AC_PAX_KERNEL_FSYNC_WITHOUT_DENTRY], [
-+ ZFS_LINUX_TRY_COMPILE([
-+ #include <linux/fs.h>
-+ ],[
-+ int (*fsync) (struct file *, int) = NULL;
-+ file_operations_no_const fops __attribute__ ((unused));
-+
-+ fops.fsync = fsync;
-+ ],[
-+ AC_MSG_RESULT([no dentry])
-+ AC_DEFINE(HAVE_FSYNC_WITHOUT_DENTRY, 1,
-+ [fops->fsync() without dentry])
-+ ],[
-+ ])
-+])
-+
-+dnl #
-+dnl # PaX Linux 3.1 -x 3.x API
-+dnl #
-+AC_DEFUN([ZFS_AC_PAX_KERNEL_FSYNC_RANGE], [
-+ ZFS_LINUX_TRY_COMPILE([
-+ #include <linux/fs.h>
-+ ],[
-+ int (*fsync) (struct file *, loff_t, loff_t, int) = NULL;
-+ file_operations_no_const fops __attribute__ ((unused));
-+
-+ fops.fsync = fsync;
-+ ],[
-+ AC_MSG_RESULT([range])
-+ AC_DEFINE(HAVE_FSYNC_RANGE, 1,
-+ [fops->fsync() with range])
-+ ],[
-+ ])
-+])
-+
- AC_DEFUN([ZFS_AC_KERNEL_FSYNC], [
- AC_MSG_CHECKING([whether fops->fsync() wants])
- ZFS_AC_KERNEL_FSYNC_WITH_DENTRY
- ZFS_AC_KERNEL_FSYNC_WITHOUT_DENTRY
- ZFS_AC_KERNEL_FSYNC_RANGE
-+ ZFS_AC_PAX_KERNEL_FSYNC_WITH_DENTRY
-+ ZFS_AC_PAX_KERNEL_FSYNC_WITHOUT_DENTRY
-+ ZFS_AC_PAX_KERNEL_FSYNC_RANGE
- ])
-diff --git a/include/sys/zfs_acl.h b/include/sys/zfs_acl.h
-index b6ed439..11fc335 100644
---- a/include/sys/zfs_acl.h
-+++ b/include/sys/zfs_acl.h
-@@ -165,7 +165,7 @@
- uint64_t z_hints; /* ACL hints (ZFS_INHERIT_ACE ...) */
- zfs_acl_node_t *z_curr_node; /* current node iterator is handling */
- list_t z_acl; /* chunks of ACE data */
-- acl_ops_t z_ops; /* ACL operations */
-+ acl_ops_t *z_ops; /* ACL operations */
- } zfs_acl_t;
-
- typedef struct acl_locator_cb {
-diff --git a/module/zfs/zfs_acl.c b/module/zfs/zfs_acl.c
-index 40f792b..df690b3 100644
---- a/module/zfs/zfs_acl.c
-+++ b/module/zfs/zfs_acl.c
-@@ -457,9 +457,9 @@
- offsetof(zfs_acl_node_t, z_next));
- aclp->z_version = vers;
- if (vers == ZFS_ACL_VERSION_FUID)
-- aclp->z_ops = zfs_acl_fuid_ops;
-+ aclp->z_ops = &zfs_acl_fuid_ops;
- else
-- aclp->z_ops = zfs_acl_v0_ops;
-+ aclp->z_ops = &zfs_acl_v0_ops;
- return (aclp);
- }
-
-@@ -609,17 +609,17 @@
- /*
- * Make sure we don't overstep our bounds
- */
-- ace_size = aclp->z_ops.ace_size(acep);
-+ ace_size = aclp->z_ops->ace_size(acep);
-
- if (((caddr_t)acep + ace_size) >
- ((caddr_t)aclnode->z_acldata + aclnode->z_size)) {
- return (NULL);
- }
-
-- *iflags = aclp->z_ops.ace_flags_get(acep);
-- *type = aclp->z_ops.ace_type_get(acep);
-- *access_mask = aclp->z_ops.ace_mask_get(acep);
-- *who = aclp->z_ops.ace_who_get(acep);
-+ *iflags = aclp->z_ops->ace_flags_get(acep);
-+ *type = aclp->z_ops->ace_type_get(acep);
-+ *access_mask = aclp->z_ops->ace_mask_get(acep);
-+ *who = aclp->z_ops->ace_who_get(acep);
- aclp->z_next_ace = (caddr_t)aclp->z_next_ace + ace_size;
- aclnode->z_ace_idx++;
-
-@@ -698,7 +698,7 @@
- }
-
- aceptr = (zfs_ace_t *)((caddr_t)aceptr +
-- aclp->z_ops.ace_size(aceptr));
-+ aclp->z_ops->ace_size(aceptr));
- }
-
- *size = (caddr_t)aceptr - (caddr_t)z_acl;
-@@ -824,7 +824,7 @@
-
- newaclnode = zfs_acl_node_alloc(aclp->z_acl_count *
- sizeof (zfs_object_ace_t));
-- aclp->z_ops = zfs_acl_fuid_ops;
-+ aclp->z_ops = &zfs_acl_fuid_ops;
- VERIFY(zfs_copy_ace_2_fuid(ZTOZSB(zp), ZTOI(zp)->i_mode,
- aclp, oldaclp, newaclnode->z_acldata, aclp->z_acl_count,
- &newaclnode->z_size, NULL, cr) == 0);
-@@ -868,12 +868,12 @@
- {
- uint16_t type = entry_type & ACE_TYPE_FLAGS;
-
-- aclp->z_ops.ace_mask_set(acep, access_mask);
-- aclp->z_ops.ace_type_set(acep, access_type);
-- aclp->z_ops.ace_flags_set(acep, entry_type);
-+ aclp->z_ops->ace_mask_set(acep, access_mask);
-+ aclp->z_ops->ace_type_set(acep, access_type);
-+ aclp->z_ops->ace_flags_set(acep, entry_type);
- if ((type != ACE_OWNER && type != OWNING_GROUP &&
- type != ACE_EVERYONE))
-- aclp->z_ops.ace_who_set(acep, fuid);
-+ aclp->z_ops->ace_who_set(acep, fuid);
- }
-
- /*
-@@ -1454,7 +1454,7 @@
- uint16_t iflags, type;
- uint32_t access_mask;
- zfs_acl_node_t *newnode;
-- size_t abstract_size = aclp->z_ops.ace_abstract_size();
-+ size_t abstract_size = aclp->z_ops->ace_abstract_size();
- void *zacep;
- uint32_t owner, group, everyone;
- uint32_t deny1, deny2, allow0;
-@@ -1530,7 +1530,7 @@
- }
- }
- zfs_set_ace(aclp, zacep, access_mask, type, who, iflags);
-- ace_size = aclp->z_ops.ace_size(acep);
-+ ace_size = aclp->z_ops->ace_size(acep);
- zacep = (void *)((uintptr_t)zacep + ace_size);
- new_count++;
- new_bytes += ace_size;
-@@ -1570,12 +1570,12 @@
- static void
- zfs_restricted_update(zfs_sb_t *zsb, zfs_acl_t *aclp, void *acep)
- {
-- uint32_t mask = aclp->z_ops.ace_mask_get(acep);
-+ uint32_t mask = aclp->z_ops->ace_mask_get(acep);
-
- if ((zsb->z_acl_inherit == ZFS_ACL_RESTRICTED) &&
-- (aclp->z_ops.ace_type_get(acep) == ALLOW)) {
-+ (aclp->z_ops->ace_type_get(acep) == ALLOW)) {
- mask &= ~RESTRICTED_CLEAR;
-- aclp->z_ops.ace_mask_set(acep, mask);
-+ aclp->z_ops->ace_mask_set(acep, mask);
- }
- }
-
-@@ -1640,7 +1640,7 @@
- if (noallow && type == ALLOW)
- continue;
-
-- ace_size = aclp->z_ops.ace_size(pacep);
-+ ace_size = aclp->z_ops->ace_size(pacep);
-
- if (!zfs_ace_can_use(obj_mode, iflags))
- continue;
-@@ -1672,8 +1672,8 @@
- /*
- * Copy special opaque data if any
- */
-- if ((data1sz = paclp->z_ops.ace_data(pacep, &data1)) != 0) {
-- VERIFY((data2sz = aclp->z_ops.ace_data(acep,
-+ if ((data1sz = paclp->z_ops->ace_data(pacep, &data1)) != 0) {
-+ VERIFY((data2sz = aclp->z_ops->ace_data(acep,
- &data2)) == data1sz);
- bcopy(data1, data2, data2sz);
- }
-@@ -1681,14 +1681,14 @@
- aclp->z_acl_count++;
- aclnode->z_ace_count++;
- aclp->z_acl_bytes += aclnode->z_size;
-- newflags = aclp->z_ops.ace_flags_get(acep);
-+ newflags = aclp->z_ops->ace_flags_get(acep);
-
- if (vdir)
- aclp->z_hints |= ZFS_INHERIT_ACE;
-
- if ((iflags & ACE_NO_PROPAGATE_INHERIT_ACE) || !vdir) {
- newflags &= ~ALL_INHERIT;
-- aclp->z_ops.ace_flags_set(acep,
-+ aclp->z_ops->ace_flags_set(acep,
- newflags|ACE_INHERITED_ACE);
- zfs_restricted_update(zsb, aclp, acep);
- continue;
-@@ -1703,11 +1703,11 @@
- if ((iflags & (ACE_FILE_INHERIT_ACE |
- ACE_DIRECTORY_INHERIT_ACE)) == ACE_FILE_INHERIT_ACE) {
- newflags |= ACE_INHERIT_ONLY_ACE;
-- aclp->z_ops.ace_flags_set(acep,
-+ aclp->z_ops->ace_flags_set(acep,
- newflags|ACE_INHERITED_ACE);
- } else {
- newflags &= ~ACE_INHERIT_ONLY_ACE;
-- aclp->z_ops.ace_flags_set(acep,
-+ aclp->z_ops->ace_flags_set(acep,
- newflags|ACE_INHERITED_ACE);
- }
- }
-diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c
-index 1f6169b..5b6692f 100644
---- a/module/zfs/zpl_inode.c
-+++ b/module/zfs/zpl_inode.c
-@@ -294,7 +294,7 @@
- static void
- zpl_put_link(struct dentry *dentry, struct nameidata *nd, void *ptr)
- {
-- char *link;
-+ const char *link;
-
- link = nd_get_link(nd);
- if (!IS_ERR(link))
---
-1.7.10
-
diff --git a/sys-fs/zfs/files/zfs-0.6.0_rc9-linux-3.5-support.patch b/sys-fs/zfs/files/zfs-0.6.0_rc9-linux-3.5-support.patch
deleted file mode 100644
index c337bcf804a1..000000000000
--- a/sys-fs/zfs/files/zfs-0.6.0_rc9-linux-3.5-support.patch
+++ /dev/null
@@ -1,183 +0,0 @@
-commit c414d98b9f99aaa68abd418c93fad6e9bb3adca6
-Author: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Tue Jul 10 07:34:53 2012 -0400
-
- Linux 3.5 compatibility: miscellaneous changes
-
- torvalds/linux@b0b0382bb4904965a9e9fca77ad87514dfda0d1c changed
- export_operations->encode_fn() to use struct inode * instead of struct
- dentry *
-
- torvalds/linux@17cf28afea2a1112f240a3a2da8af883be024811 renamed
- end_writeback() to clear_inode()
-
- torvalds/linux@17cf28afea2a1112f240a3a2da8af883be024811 removed
- inode_operations->truncate_range(). The file hole punching functionality
- is provided by inode_operations->fallocate()
-
- Closes zfsonlinux/zfs#784
-
- Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
-
-diff --git a/config/kernel-clear-inode.m4 b/config/kernel-clear-inode.m4
-new file mode 100644
-index 0000000..bedfc51
---- /dev/null
-+++ b/config/kernel-clear-inode.m4
-@@ -0,0 +1,13 @@
-+dnl #
-+dnl # 3.5.0 API change
-+dnl # torvalds/linux@90324cc1b11a211e37eabd8cb863e1a1561d6b1d renamed
-+dnl # end_writeback() to clear_inode().
-+dnl #
-+AC_DEFUN([ZFS_AC_KERNEL_CLEAR_INODE], [
-+ ZFS_CHECK_SYMBOL_EXPORT(
-+ [clear_inode],
-+ [fs/inode.c],
-+ [AC_DEFINE(HAVE_CLEAR_INODE, 1,
-+ [clear_inode() is available])],
-+ [])
-+])
-diff --git a/config/kernel-encode_fh-inode.m4 b/config/kernel-encode_fh-inode.m4
-new file mode 100644
-index 0000000..e4d448d
---- /dev/null
-+++ b/config/kernel-encode_fh-inode.m4
-@@ -0,0 +1,23 @@
-+dnl #
-+dnl # 3.5.0 API change #
-+dnl # torvalds/linux@b0b0382bb4904965a9e9fca77ad87514dfda0d1c changed the header
-+dnl # to use struct inode * instead of struct dentry *
-+dnl #
-+AC_DEFUN([ZFS_AC_KERNEL_EXPORT_ENCODE_FH_WITH_INODE_PARAMETER], [
-+ AC_MSG_CHECKING([export_operations->encodefh()])
-+ ZFS_LINUX_TRY_COMPILE([
-+ #include <linux/exportfs.h>
-+ ],[
-+ int (*encode_fh)(struct inode *, __u32 *fh, int *, struct inode *) = NULL;
-+ struct export_operations export_ops = {
-+ .encode_fh = encode_fh,
-+ };
-+ export_ops.encode_fh(0, 0, 0, 0);
-+ ],[
-+ AC_MSG_RESULT(uses struct inode * as first parameter)
-+ AC_DEFINE(HAVE_EXPORT_ENCODE_FH_WITH_INODE_PARAMETER, 1,
-+ [fhfn() uses struct inode *])
-+ ],[
-+ AC_MSG_RESULT(does not use struct inode * as first parameter)
-+ ])
-+])
-diff --git a/config/kernel-truncate-range.m4 b/config/kernel-truncate-range.m4
-new file mode 100644
-index 0000000..1f23d6a
---- /dev/null
-+++ b/config/kernel-truncate-range.m4
-@@ -0,0 +1,26 @@
-+dnl #
-+dnl # 3.5.0 API change #
-+dnl # torvalds/linux@17cf28afea2a1112f240a3a2da8af883be024811 removed
-+dnl # truncate_range(). The file hole punching functionality is provided by
-+dnl # fallocate()
-+dnl #
-+AC_DEFUN([ZFS_AC_KERNEL_INODE_TRUNCATE_RANGE], [
-+ AC_MSG_CHECKING([inode_operations->truncate_range() exists])
-+ ZFS_LINUX_TRY_COMPILE([
-+ #include <linux/fs.h>
-+ ],[
-+ void (*tr)(struct inode *, loff_t, loff_t) = NULL;
-+ struct inode_operations inode_ops = {
-+ .truncate_range = tr,
-+ };
-+ inode_ops.truncate_range(0, 0, 0);
-+
-+
-+ ],[
-+ AC_MSG_RESULT(yes)
-+ AC_DEFINE(HAVE_INODE_TRUNCATE_RANGE, 1,
-+ [inode_operations->truncate_range() exists])
-+ ],[
-+ AC_MSG_RESULT(no)
-+ ])
-+])
-diff --git a/config/kernel.m4 b/config/kernel.m4
-index 7f07c90..752a7df 100644
---- a/config/kernel.m4
-+++ b/config/kernel.m4
-@@ -59,6 +59,9 @@ AC_DEFUN([ZFS_AC_CONFIG_KERNEL], [
- ZFS_AC_KERNEL_BDI
- ZFS_AC_KERNEL_BDI_SETUP_AND_REGISTER
- ZFS_AC_KERNEL_SET_NLINK
-+ ZFS_AC_KERNEL_EXPORT_ENCODE_FH_WITH_INODE_PARAMETER
-+ ZFS_AC_KERNEL_INODE_TRUNCATE_RANGE
-+ ZFS_AC_KERNEL_CLEAR_INODE
-
- AS_IF([test "$LINUX_OBJ" != "$LINUX"], [
- KERNELMAKE_PARAMS="$KERNELMAKE_PARAMS O=$LINUX_OBJ"
-diff --git a/module/zfs/zpl_export.c b/module/zfs/zpl_export.c
-index f82ee30..ab6e6d2 100644
---- a/module/zfs/zpl_export.c
-+++ b/module/zfs/zpl_export.c
-@@ -30,10 +30,15 @@
-
-
- static int
-+#ifdef HAVE_EXPORT_ENCODE_FH_WITH_INODE_PARAMETER
-+zpl_encode_fh(struct inode *ip, __u32 *fh, int *max_len, struct inode *parent)
-+{
-+#else
- zpl_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, int connectable)
- {
-- fid_t *fid = (fid_t *)fh;
- struct inode *ip = dentry->d_inode;
-+#endif
-+ fid_t *fid = (fid_t *)fh;
- int len_bytes, rc;
-
- len_bytes = *max_len * sizeof (__u32);
-diff --git a/module/zfs/zpl_inode.c b/module/zfs/zpl_inode.c
-index 1f6169b..51202e7 100644
---- a/module/zfs/zpl_inode.c
-+++ b/module/zfs/zpl_inode.c
-@@ -329,6 +329,7 @@ out:
- return (error);
- }
-
-+#ifdef HAVE_INODE_TRUNCATE_RANGE
- static void
- zpl_truncate_range(struct inode* ip, loff_t start, loff_t end)
- {
-@@ -355,6 +356,7 @@ zpl_truncate_range(struct inode* ip, loff_t start, loff_t end)
-
- crfree(cr);
- }
-+#endif
-
- #ifdef HAVE_INODE_FALLOCATE
- static long
-@@ -380,7 +382,9 @@ const struct inode_operations zpl_inode_operations = {
- .getxattr = generic_getxattr,
- .removexattr = generic_removexattr,
- .listxattr = zpl_xattr_list,
-+#ifdef HAVE_INODE_TRUNCATE_RANGE
- .truncate_range = zpl_truncate_range,
-+#endif /* HAVE_INODE_TRUNCATE_RANGE */
- #ifdef HAVE_INODE_FALLOCATE
- .fallocate = zpl_fallocate,
- #endif /* HAVE_INODE_FALLOCATE */
-diff --git a/module/zfs/zpl_super.c b/module/zfs/zpl_super.c
-index 98d0a03..c2aac35 100644
---- a/module/zfs/zpl_super.c
-+++ b/module/zfs/zpl_super.c
-@@ -75,7 +75,12 @@ static void
- zpl_evict_inode(struct inode *ip)
- {
- truncate_setsize(ip, 0);
-+#ifdef HAVE_CLEAR_INODE
-+ clear_inode(ip);
-+#else
- end_writeback(ip);
-+
-+#endif
- zfs_inactive(ip);
- }
-
diff --git a/sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-1-of-3.patch b/sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-1-of-3.patch
deleted file mode 100644
index 51a81363eac8..000000000000
--- a/sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-1-of-3.patch
+++ /dev/null
@@ -1,44 +0,0 @@
-From e2060f922f8526aecf437de4cc4dff4c3cdfae16 Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Tue, 15 May 2012 23:19:32 -0400
-Subject: [PATCH] Revert Fix ASSERTION(!dsl_pool_sync_context(tx->tx_pool))
-
-Commit eec8164771bee067c3cd55ed0a16dadeeba276de worked around an issue
-involving direct reclaim through the use of PF_MEMALLOC. Since we
-are reworking thing to use KM_PUSHPAGE so that swap works, we revert
-this patch in favor of the use of KM_PUSHPAGE in the affected areas.
-
-Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Issue #726
----
- module/zfs/txg.c | 13 -------------
- 1 file changed, 13 deletions(-)
-
-diff --git a/module/zfs/txg.c b/module/zfs/txg.c
-index 5021e44..8d037f7 100644
---- a/module/zfs/txg.c
-+++ b/module/zfs/txg.c
-@@ -372,19 +372,6 @@
- callb_cpr_t cpr;
- uint64_t start, delta;
-
--#ifdef _KERNEL
-- /*
-- * Disable the normal reclaim path for the txg_sync thread. This
-- * ensures the thread will never enter dmu_tx_assign() which can
-- * otherwise occur due to direct reclaim. If this is allowed to
-- * happen the system can deadlock. Direct reclaim call path:
-- *
-- * ->shrink_icache_memory->prune_icache->dispose_list->
-- * clear_inode->zpl_clear_inode->zfs_inactive->dmu_tx_assign
-- */
-- current->flags |= PF_MEMALLOC;
--#endif /* _KERNEL */
--
- txg_thread_enter(tx, &cpr);
-
- start = delta = 0;
---
-1.7.10
-
diff --git a/sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-2-of-3.patch b/sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-2-of-3.patch
deleted file mode 100644
index 0a4fd26040e7..000000000000
--- a/sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-2-of-3.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 78d26b8497b3845fc8130981c76214d6788f7a9d Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Mon, 7 May 2012 14:14:45 -0400
-Subject: [PATCH] Revert Fix zpl_writepage() deadlock
-
-The commit, cfc9a5c88f91f7b4d606fce89505e1f404691ea5, to fix deadlocks
-in zpl_writepage() relied on PF_MEMALLOC. That had the effect of
-disabling the direct reclaim path on all allocations originating from
-calls to this function, but it failed to address the actual cause of
-those deadlocks. This led to the same deadlocks being observed with
-swap on zvols, but not with swap on the loop device, which exercises
-this code.
-
-The use of PF_MEMALLOC also had the side effect of permitting
-allocations to be made from ZONE_DMA in instances that did not require
-it. This contributes to the possibility of panics caused by depletion
-of pages from ZONE_DMA.
-
-As such, we revert this patch in favor of a proper fix for both issues.
-
-Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Issue #726
----
- module/zfs/zpl_file.c | 15 +--------------
- 1 file changed, 1 insertion(+), 14 deletions(-)
-
-diff --git a/module/zfs/zpl_file.c b/module/zfs/zpl_file.c
-index 5ac41c9..2e9f72a 100644
---- a/module/zfs/zpl_file.c
-+++ b/module/zfs/zpl_file.c
-@@ -358,20 +358,7 @@
- ASSERT(PageLocked(pp));
- ASSERT(!PageWriteback(pp));
-
-- /*
-- * Disable the normal reclaim path for zpl_putpage(). This
-- * ensures that all memory allocations under this call path
-- * will never enter direct reclaim. If this were to happen
-- * the VM might try to write out additional pages by calling
-- * zpl_putpage() again resulting in a deadlock.
-- */
-- if (current->flags & PF_MEMALLOC) {
-- (void) zfs_putpage(mapping->host, pp, wbc);
-- } else {
-- current->flags |= PF_MEMALLOC;
-- (void) zfs_putpage(mapping->host, pp, wbc);
-- current->flags &= ~PF_MEMALLOC;
-- }
-+ (void) zfs_putpage(mapping->host, pp, wbc);
-
- return (0);
- }
---
-1.7.10
-
diff --git a/sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-3-of-3.patch b/sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-3-of-3.patch
deleted file mode 100644
index 2eb85754b0f8..000000000000
--- a/sys-fs/zfs/files/zfs-0.6.0_rc9-remove-pfmalloc-3-of-3.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From a1c889dd6fb04d70439074a9399c9ea8f29f2cdb Mon Sep 17 00:00:00 2001
-From: Richard Yao <ryao@cs.stonybrook.edu>
-Date: Wed, 16 May 2012 18:16:02 -0400
-Subject: [PATCH] Revert Disable direct reclaim for z_wr_* threads
-
-This commit used PF_MEMALLOC to prevent a memory reclaim deadlock.
-However, commit 49be0ccf1fdc2ce852271d4d2f8b7a9c2c4be6db eliminated
-the invocation of __cv_init(), which was the cause of the deadlock.
-PF_MEMALLOC has the side effect of permitting pages from ZONE_DMA
-to be allocated. The use of PF_MEMALLOC was found to cause stability
-problems when doing swap on zvols. Since this technique is known to
-cause problems and no longer fixes anything, we revert it.
-
-Signed-off-by: Richard Yao <ryao@cs.stonybrook.edu>
-Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
-Issue #726
----
- include/sys/zfs_context.h | 1 -
- module/zfs/spa.c | 9 +++------
- 2 files changed, 3 insertions(+), 7 deletions(-)
-
-diff --git a/include/sys/zfs_context.h b/include/sys/zfs_context.h
-index e4af6fc..77dded3 100644
---- a/include/sys/zfs_context.h
-+++ b/include/sys/zfs_context.h
-@@ -382,7 +382,6 @@ extern kstat_t *kstat_create(char *, int,
- #define TASKQ_DYNAMIC 0x0004 /* Use dynamic thread scheduling */
- #define TASKQ_THREADS_CPU_PCT 0x0008 /* Scale # threads by # cpus */
- #define TASKQ_DC_BATCH 0x0010 /* Mark threads as batch */
--#define TASKQ_NORECLAIM 0x0020 /* Disable direct memory reclaim */
-
- #define TQ_SLEEP KM_SLEEP /* Can block for memory */
- #define TQ_NOSLEEP KM_NOSLEEP /* cannot block for memory; may fail */
-diff --git a/module/zfs/spa.c b/module/zfs/spa.c
-index c33a33a..436cd26 100644
---- a/module/zfs/spa.c
-+++ b/module/zfs/spa.c
-@@ -617,8 +617,9 @@ static inline int spa_load_impl(spa_t *spa, uint64_t, nvlist_t *config,
-
- static taskq_t *
- spa_taskq_create(spa_t *spa, const char *name, enum zti_modes mode,
-- uint_t value, uint_t flags)
-+ uint_t value)
- {
-+ uint_t flags = TASKQ_PREPOPULATE;
- boolean_t batch = B_FALSE;
-
- switch (mode) {
-@@ -668,17 +669,13 @@ static inline int spa_load_impl(spa_t *spa, uint64_t, nvlist_t *config,
- const zio_taskq_info_t *ztip = &zio_taskqs[t][q];
- enum zti_modes mode = ztip->zti_mode;
- uint_t value = ztip->zti_value;
-- uint_t flags = 0;
- char name[32];
-
-- if (t == ZIO_TYPE_WRITE)
-- flags |= TASKQ_NORECLAIM;
--
- (void) snprintf(name, sizeof (name),
- "%s_%s", zio_type_name[t], zio_taskq_types[q]);
-
- spa->spa_zio_taskq[t][q] =
-- spa_taskq_create(spa, name, mode, value, flags);
-+ spa_taskq_create(spa, name, mode, value);
- }
- }
- }
---
-1.7.10
-
diff --git a/sys-fs/zfs/metadata.xml b/sys-fs/zfs/metadata.xml
index 0703d98511ce..4b0c992ad1fd 100644
--- a/sys-fs/zfs/metadata.xml
+++ b/sys-fs/zfs/metadata.xml
@@ -6,7 +6,7 @@
<name>Richard Yao</name>
</maintainer>
<use>
- <flag name="dracut">Install dracut module</flag>
+ <flag name="kernel-builtin">Disable dependency on sys-fs/zfs-kmod under the assumption that ZFS is part of the kernel source tree</flag>
<flag name="rootfs">Install zfs-shutdown script to support exporting a pool containing rootfs</flag>
<flag name="test-suite">Install regression test suite</flag>
</use>
diff --git a/sys-fs/zfs/zfs-0.6.0_rc10.ebuild b/sys-fs/zfs/zfs-0.6.0_rc10-r1.ebuild
index 87359bbcfa08..32d6f2804427 100644
--- a/sys-fs/zfs/zfs-0.6.0_rc10.ebuild
+++ b/sys-fs/zfs/zfs-0.6.0_rc10-r1.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/zfs-0.6.0_rc10.ebuild,v 1.1 2012/08/15 23:04:21 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/zfs-0.6.0_rc10-r1.ebuild,v 1.1 2012/08/22 07:31:11 ryao Exp $
EAPI="4"
@@ -8,7 +8,7 @@ AT_M4DIR="config"
AUTOTOOLS_AUTORECONF="1"
AUTOTOOLS_IN_SOURCE_BUILD="1"
-inherit bash-completion-r1 flag-o-matic linux-mod toolchain-funcs autotools-utils
+inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils
if [ ${PV} == "9999" ] ; then
inherit git-2
@@ -21,15 +21,15 @@ else
KEYWORDS="~amd64"
fi
-DESCRIPTION="Native ZFS for Linux"
+DESCRIPTION="Userland utilities for ZFS Linux kernel module"
HOMEPAGE="http://zfsonlinux.org/"
LICENSE="BSD-2 CDDL MIT"
SLOT="0"
-IUSE="custom-cflags debug dracut +rootfs test test-suite static-libs"
+IUSE="custom-cflags +rootfs test-suite static-libs"
+RESTRICT="test"
COMMON_DEPEND="
- =sys-kernel/spl-${PV}*
sys-apps/util-linux[static-libs?]
sys-libs/zlib[static-libs(+)?]
"
@@ -38,6 +38,7 @@ DEPEND="${COMMON_DEPEND}
"
RDEPEND="${COMMON_DEPEND}
+ =sys-fs/zfs-kmod-${PV}*
!sys-fs/zfs-fuse
!prefix? ( sys-fs/udev )
test-suite? (
@@ -55,25 +56,6 @@ RDEPEND="${COMMON_DEPEND}
app-misc/pax-utils
)
"
-DEPEND+="
- test? ( sys-fs/mdadm )
-"
-
-pkg_setup() {
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- !PREEMPT
- BLK_DEV_LOOP
- EFI_PARTITION
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE"
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK} BLK_DEV_INITRD
- DEVTMPFS"
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
- check_extra_config
-}
src_prepare() {
# Workaround for hard coded path
@@ -81,28 +63,18 @@ src_prepare() {
# Workaround rename
sed -i "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" scripts/common.sh.in || die
- if [ ${PV} != "9999" ]
- then
- # Fix various deadlocks
- epatch "${FILESDIR}/${PN}-0.6.0_rc9-remove-pfmalloc-1-of-3.patch"
- epatch "${FILESDIR}/${PN}-0.6.0_rc9-remove-pfmalloc-2-of-3.patch"
- epatch "${FILESDIR}/${PN}-0.6.0_rc9-remove-pfmalloc-3-of-3.patch"
- fi
-
autotools-utils_src_prepare
}
src_configure() {
use custom-cflags || strip-flags
- set_arch_to_kernel
local myeconfargs=(
--bindir="${EPREFIX}/bin"
--sbindir="${EPREFIX}/sbin"
- --with-config=all
+ --with-config=user
--with-linux="${KV_DIR}"
--with-linux-obj="${KV_OUT_DIR}"
--with-udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
- $(use_enable debug)
)
autotools-utils_src_configure
}
@@ -120,7 +92,7 @@ src_test() {
src_install() {
autotools-utils_src_install
gen_usr_ldscript -a uutil nvpair zpool zfs
- use dracut || rm -rf "${ED}usr/share/dracut"
+ rm -rf "${ED}usr/share/dracut"
use test-suite || rm -rf "${ED}usr/libexec"
if use rootfs
@@ -135,9 +107,6 @@ src_install() {
}
pkg_postinst() {
- linux-mod_pkg_postinst
-
- use x86 && ewarn "32-bit kernels are unsupported by ZFSOnLinux upstream. Do not file bug reports."
[ -e "${EROOT}/etc/runlevels/boot/zfs" ] \
|| ewarn 'You should add zfs to the boot runlevel.'
diff --git a/sys-fs/zfs/zfs-0.6.0_rc9-r6.ebuild b/sys-fs/zfs/zfs-0.6.0_rc9-r6.ebuild
deleted file mode 100644
index ceeb58aa17a4..000000000000
--- a/sys-fs/zfs/zfs-0.6.0_rc9-r6.ebuild
+++ /dev/null
@@ -1,157 +0,0 @@
-# Copyright 1999-2012 Gentoo Foundation
-# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/zfs-0.6.0_rc9-r6.ebuild,v 1.5 2012/08/11 20:05:05 ryao Exp $
-
-EAPI="4"
-
-AT_M4DIR="config"
-AUTOTOOLS_AUTORECONF="1"
-AUTOTOOLS_IN_SOURCE_BUILD="1"
-
-inherit bash-completion-r1 flag-o-matic linux-mod toolchain-funcs autotools-utils
-
-if [ ${PV} == "9999" ] ; then
- inherit git-2
- EGIT_REPO_URI="git://github.com/zfsonlinux/${PN}.git"
-else
- inherit eutils versionator
- MY_PV=$(replace_version_separator 3 '-')
- SRC_URI="https://github.com/downloads/zfsonlinux/${PN}/${PN}-${MY_PV}.tar.gz"
- S="${WORKDIR}/${PN}-${MY_PV}"
- KEYWORDS="~amd64"
-fi
-
-DESCRIPTION="Native ZFS for Linux"
-HOMEPAGE="http://zfsonlinux.org/"
-
-LICENSE="BSD-2 CDDL MIT"
-SLOT="0"
-IUSE="custom-cflags debug dracut +rootfs test test-suite static-libs"
-
-COMMON_DEPEND="
- =sys-kernel/spl-${PV}*
- sys-apps/util-linux[static-libs?]
- sys-libs/zlib[static-libs(+)?]
-"
-DEPEND="${COMMON_DEPEND}
- virtual/pkgconfig
-"
-
-RDEPEND="${COMMON_DEPEND}
- !sys-fs/zfs-fuse
- !prefix? ( sys-fs/udev )
- test-suite? (
- sys-apps/gawk
- sys-apps/util-linux
- sys-devel/bc
- sys-block/parted
- sys-fs/lsscsi
- sys-fs/mdadm
- sys-process/procps
- virtual/modutils
- )
- rootfs? (
- app-arch/cpio
- app-misc/pax-utils
- )
-"
-DEPEND+="
- test? ( sys-fs/mdadm )
-"
-
-pkg_setup() {
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- !PREEMPT
- BLK_DEV_LOOP
- EFI_PARTITION
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE"
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK} BLK_DEV_INITRD
- DEVTMPFS"
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
- check_extra_config
-}
-
-src_prepare() {
- # Workaround for hard coded path
- sed -i "s|/sbin/lsmod|/bin/lsmod|" scripts/common.sh.in || die
- # Workaround rename
- sed -i "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" scripts/common.sh.in || die
-
- if [ ${PV} != "9999" ]
- then
- # Fix build issues
- epatch "${FILESDIR}/${P}-hardened-support.patch"
- epatch "${FILESDIR}/${P}-hardened-3.3-and-later-support.patch"
- epatch "${FILESDIR}/${P}-linux-3.5-support.patch"
- epatch "${FILESDIR}/${P}-fix-32-bit-warnings.patch"
-
- # Fix various deadlocks
- epatch "${FILESDIR}/${P}-remove-pfmalloc-1-of-3.patch"
- epatch "${FILESDIR}/${P}-remove-pfmalloc-2-of-3.patch"
- epatch "${FILESDIR}/${P}-remove-pfmalloc-3-of-3.patch"
-
- #Miscellaneous
- epatch "${FILESDIR}/${P}-bsd-init.patch"
- fi
-
- autotools-utils_src_prepare
-}
-
-src_configure() {
- use custom-cflags || strip-flags
- set_arch_to_kernel
- local myeconfargs=(
- --bindir="${EPREFIX}/bin"
- --sbindir="${EPREFIX}/sbin"
- --with-config=all
- --with-linux="${KV_DIR}"
- --with-linux-obj="${KV_OUT_DIR}"
- --with-udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
- $(use_enable debug)
- )
- autotools-utils_src_configure
-}
-
-src_test() {
- if [ $UID -ne 0 ]
- then
- ewarn "Cannot run make check tests with FEATURES=userpriv."
- ewarn "Skipping make check tests."
- else
- autotools-utils_src_test
- fi
-}
-
-src_install() {
- autotools-utils_src_install
- gen_usr_ldscript -a uutil nvpair zpool zfs
- use dracut || rm -rf "${ED}usr/share/dracut"
- use test-suite || rm -rf "${ED}usr/libexec"
-
- if use rootfs
- then
- doinitd "${FILESDIR}/zfs-shutdown"
- exeinto /usr/share/zfs
- doexe "${FILESDIR}/linuxrc"
- fi
-
- newbashcomp "${FILESDIR}/bash-completion" zfs
-
-}
-
-pkg_postinst() {
- linux-mod_pkg_postinst
-
- use x86 && ewarn "32-bit kernels are unsupported by ZFSOnLinux upstream. Do not file bug reports."
-
- [ -e "${EROOT}/etc/runlevels/boot/zfs" ] \
- || ewarn 'You should add zfs to the boot runlevel.'
-
- use rootfs && ([ -e "${EROOT}/etc/runlevels/shutdown/zfs-shutdown" ] \
- || ewarn 'You should add zfs-shutdown to the shutdown runlevel.')
-
-}
diff --git a/sys-fs/zfs/zfs-9999.ebuild b/sys-fs/zfs/zfs-9999.ebuild
index 22f957af5b07..7b0cf54c993d 100644
--- a/sys-fs/zfs/zfs-9999.ebuild
+++ b/sys-fs/zfs/zfs-9999.ebuild
@@ -1,6 +1,6 @@
# Copyright 1999-2012 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
-# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/zfs-9999.ebuild,v 1.34 2012/08/15 23:04:21 ryao Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-fs/zfs/zfs-9999.ebuild,v 1.35 2012/08/22 07:31:11 ryao Exp $
EAPI="4"
@@ -8,7 +8,7 @@ AT_M4DIR="config"
AUTOTOOLS_AUTORECONF="1"
AUTOTOOLS_IN_SOURCE_BUILD="1"
-inherit bash-completion-r1 flag-o-matic linux-mod toolchain-funcs autotools-utils
+inherit bash-completion-r1 flag-o-matic toolchain-funcs autotools-utils
if [ ${PV} == "9999" ] ; then
inherit git-2
@@ -21,15 +21,15 @@ else
KEYWORDS="~amd64"
fi
-DESCRIPTION="Native ZFS for Linux"
+DESCRIPTION="Userland utilities for ZFS Linux kernel module"
HOMEPAGE="http://zfsonlinux.org/"
LICENSE="BSD-2 CDDL MIT"
SLOT="0"
-IUSE="custom-cflags debug dracut +rootfs test test-suite static-libs"
+IUSE="custom-cflags +rootfs test-suite static-libs"
+RESTRICT="test"
COMMON_DEPEND="
- =sys-kernel/spl-${PV}*
sys-apps/util-linux[static-libs?]
sys-libs/zlib[static-libs(+)?]
"
@@ -38,6 +38,7 @@ DEPEND="${COMMON_DEPEND}
"
RDEPEND="${COMMON_DEPEND}
+ =sys-fs/zfs-kmod-${PV}*
!sys-fs/zfs-fuse
!prefix? ( sys-fs/udev )
test-suite? (
@@ -55,25 +56,6 @@ RDEPEND="${COMMON_DEPEND}
app-misc/pax-utils
)
"
-DEPEND+="
- test? ( sys-fs/mdadm )
-"
-
-pkg_setup() {
- CONFIG_CHECK="!DEBUG_LOCK_ALLOC
- !PREEMPT
- BLK_DEV_LOOP
- EFI_PARTITION
- MODULES
- !PAX_KERNEXEC_PLUGIN_METHOD_OR
- ZLIB_DEFLATE
- ZLIB_INFLATE"
- use rootfs && \
- CONFIG_CHECK="${CONFIG_CHECK} BLK_DEV_INITRD
- DEVTMPFS"
- kernel_is ge 2 6 26 || die "Linux 2.6.26 or newer required"
- check_extra_config
-}
src_prepare() {
# Workaround for hard coded path
@@ -81,28 +63,18 @@ src_prepare() {
# Workaround rename
sed -i "s|/usr/bin/scsi-rescan|/usr/sbin/rescan-scsi-bus|" scripts/common.sh.in || die
- if [ ${PV} != "9999" ]
- then
- # Fix various deadlocks
- epatch "${FILESDIR}/${PN}-0.6.0_rc9-remove-pfmalloc-1-of-3.patch"
- epatch "${FILESDIR}/${PN}-0.6.0_rc9-remove-pfmalloc-2-of-3.patch"
- epatch "${FILESDIR}/${PN}-0.6.0_rc9-remove-pfmalloc-3-of-3.patch"
- fi
-
autotools-utils_src_prepare
}
src_configure() {
use custom-cflags || strip-flags
- set_arch_to_kernel
local myeconfargs=(
--bindir="${EPREFIX}/bin"
--sbindir="${EPREFIX}/sbin"
- --with-config=all
+ --with-config=user
--with-linux="${KV_DIR}"
--with-linux-obj="${KV_OUT_DIR}"
--with-udevdir="$($(tc-getPKG_CONFIG) --variable=udevdir udev)"
- $(use_enable debug)
)
autotools-utils_src_configure
}
@@ -120,7 +92,7 @@ src_test() {
src_install() {
autotools-utils_src_install
gen_usr_ldscript -a uutil nvpair zpool zfs
- use dracut || rm -rf "${ED}usr/share/dracut"
+ rm -rf "${ED}usr/share/dracut"
use test-suite || rm -rf "${ED}usr/libexec"
if use rootfs
@@ -135,9 +107,6 @@ src_install() {
}
pkg_postinst() {
- linux-mod_pkg_postinst
-
- use x86 && ewarn "32-bit kernels are unsupported by ZFSOnLinux upstream. Do not file bug reports."
[ -e "${EROOT}/etc/runlevels/boot/zfs" ] \
|| ewarn 'You should add zfs to the boot runlevel.'