* [gentoo-commits] gentoo-x86 commit in sys-fs/zfs/files: zfs-0.6.0_rc9-linux-3.5-support.patch zfs-0.6.0_rc9-bsd-init.patch zfs-0.6.0_rc9-use-pushpage.patch zfs-0.6.0_rc9-range-lock-caller-allocate.patch
@ 2012-07-11 13:20 Richard Yao (ryao)
0 siblings, 0 replies; only message in thread
From: Richard Yao (ryao) @ 2012-07-11 13:20 UTC (permalink / raw
To: gentoo-commits
ryao 12/07/11 13:20:31
Added: zfs-0.6.0_rc9-linux-3.5-support.patch
zfs-0.6.0_rc9-bsd-init.patch
Removed: zfs-0.6.0_rc9-use-pushpage.patch
zfs-0.6.0_rc9-range-lock-caller-allocate.patch
Log:
Linux 3.5 support, Change LICENSE variable and remove patch that had been mistakenly reintroduced in -r4 and caused regressions
(Portage version: 2.1.10.65/cvs/Linux x86_64)
Revision Changes Path
1.1 sys-fs/zfs/files/zfs-0.6.0_rc9-linux-3.5-support.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/zfs/files/zfs-0.6.0_rc9-linux-3.5-support.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/zfs/files/zfs-0.6.0_rc9-linux-3.5-support.patch?rev=1.1&content-type=text/plain
Index: zfs-0.6.0_rc9-linux-3.5-support.patch
===================================================================
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);
}
1.1 sys-fs/zfs/files/zfs-0.6.0_rc9-bsd-init.patch
file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/zfs/files/zfs-0.6.0_rc9-bsd-init.patch?rev=1.1&view=markup
plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/zfs/files/zfs-0.6.0_rc9-bsd-init.patch?rev=1.1&content-type=text/plain
Index: zfs-0.6.0_rc9-bsd-init.patch
===================================================================
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-0.6.0_rc9-bsd-init.patch,v 1.1 2012/07/11 13:20:31 ryao Exp $
depend()
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2012-07-11 13:20 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2012-07-11 13:20 [gentoo-commits] gentoo-x86 commit in sys-fs/zfs/files: zfs-0.6.0_rc9-linux-3.5-support.patch zfs-0.6.0_rc9-bsd-init.patch zfs-0.6.0_rc9-use-pushpage.patch zfs-0.6.0_rc9-range-lock-caller-allocate.patch Richard Yao (ryao)
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox