From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from pigeon.gentoo.org ([208.92.234.80] helo=lists.gentoo.org) by finch.gentoo.org with esmtp (Exim 4.77) (envelope-from ) id 1SowqQ-0007j4-01 for garchives@archives.gentoo.org; Wed, 11 Jul 2012 13:20:42 +0000 Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id 2CCCBE0683; Wed, 11 Jul 2012 13:20:34 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) by pigeon.gentoo.org (Postfix) with ESMTP id D9E93E067D for ; Wed, 11 Jul 2012 13:20:33 +0000 (UTC) Received: from flycatcher.gentoo.org (flycatcher.gentoo.org [81.93.255.6]) (using TLSv1 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id 165BC1B402F for ; Wed, 11 Jul 2012 13:20:33 +0000 (UTC) Received: by flycatcher.gentoo.org (Postfix, from userid 2325) id AD77020063; Wed, 11 Jul 2012 13:20:31 +0000 (UTC) From: "Richard Yao (ryao)" To: gentoo-commits@lists.gentoo.org Reply-To: gentoo-dev@lists.gentoo.org, ryao@gentoo.org Subject: [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 X-VCS-Repository: gentoo-x86 X-VCS-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 X-VCS-Directories: sys-fs/zfs/files X-VCS-Committer: ryao X-VCS-Committer-Name: Richard Yao Content-Type: text/plain; charset=utf8 Message-Id: <20120711132031.AD77020063@flycatcher.gentoo.org> Date: Wed, 11 Jul 2012 13:20:31 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: quoted-printable X-Archives-Salt: 9aaff88c-97e5-4a88-a584-b6b5b7a573ab X-Archives-Hash: 316d67e826849503ef650d81382c738e 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 be= en mistakenly reintroduced in -r4 and caused regressions =20 (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.pat= ch file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/zfs/files/z= fs-0.6.0_rc9-linux-3.5-support.patch?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/zfs/files/z= fs-0.6.0_rc9-linux-3.5-support.patch?rev=3D1.1&content-type=3Dtext/plain Index: zfs-0.6.0_rc9-linux-3.5-support.patch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D commit c414d98b9f99aaa68abd418c93fad6e9bb3adca6 Author: Richard Yao Date: Tue Jul 10 07:34:53 2012 -0400 Linux 3.5 compatibility: miscellaneous changes =20 torvalds/linux@b0b0382bb4904965a9e9fca77ad87514dfda0d1c changed export_operations->encode_fn() to use struct inode * instead of struc= t dentry * =20 torvalds/linux@17cf28afea2a1112f240a3a2da8af883be024811 renamed end_writeback() to clear_inode() =20 torvalds/linux@17cf28afea2a1112f240a3a2da8af883be024811 removed inode_operations->truncate_range(). The file hole punching functional= ity is provided by inode_operations->fallocate() =20 Closes zfsonlinux/zfs#784 =20 Signed-off-by: Richard Yao 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-i= node.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 th= e 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 + ],[ + int (*encode_fh)(struct inode *, __u32 *fh, int *, struct inode *) =3D= NULL; + struct export_operations export_ops =3D { + .encode_fh =3D 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-ran= ge.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 + ],[ + void (*tr)(struct inode *, loff_t, loff_t) =3D NULL; + struct inode_operations inode_ops =3D { + .truncate_range =3D tr, + }; + inode_ops.truncate_range(0, 0, 0); + + =09 + ],[ + 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 =20 AS_IF([test "$LINUX_OBJ" !=3D "$LINUX"], [ KERNELMAKE_PARAMS=3D"$KERNELMAKE_PARAMS O=3D$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 @@ =20 =20 static int +#ifdef HAVE_EXPORT_ENCODE_FH_WITH_INODE_PARAMETER +zpl_encode_fh(struct inode *ip, __u32 *fh, int *max_len, struct inode *p= arent) +{ +#else zpl_encode_fh(struct dentry *dentry, __u32 *fh, int *max_len, int connec= table) { - fid_t *fid =3D (fid_t *)fh; struct inode *ip =3D dentry->d_inode; +#endif + fid_t *fid =3D (fid_t *)fh; int len_bytes, rc; =20 len_bytes =3D *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); } =20 +#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, lo= ff_t end) =20 crfree(cr); } +#endif =20 #ifdef HAVE_INODE_FALLOCATE static long @@ -380,7 +382,9 @@ const struct inode_operations zpl_inode_operations =3D= { .getxattr =3D generic_getxattr, .removexattr =3D generic_removexattr, .listxattr =3D zpl_xattr_list, +#ifdef HAVE_INODE_TRUNCATE_RANGE .truncate_range =3D zpl_truncate_range, +#endif /* HAVE_INODE_TRUNCATE_RANGE */ #ifdef HAVE_INODE_FALLOCATE .fallocate =3D 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); } =20 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/z= fs-0.6.0_rc9-bsd-init.patch?rev=3D1.1&view=3Dmarkup plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-fs/zfs/files/z= fs-0.6.0_rc9-bsd-init.patch?rev=3D1.1&content-type=3Dtext/plain Index: zfs-0.6.0_rc9-bsd-init.patch =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D commit 0ac83722a09ccb15067cad91217103474b58dadf Author: Richard Yao Date: Tue Jul 10 09:27:09 2012 -0400 Relicense zfs.gentoo.in from GPLv2 to 2-clause BSD =20 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. =20 All of the contributors to this file have agreed to relicense it unde= r the 2-clause BSD license. I have added their Signed-offs to this comm= it, in order of first contribution. Thankyou everyone for being so understanding. =20 Signed-off-by: devsk Signed-off-by: Alexey Shvetsov Signed-off-by: Brian Behlendorf Signed-off-by: Andrew Tselischev Signed-off-by: Zachary Bedell Signed-off-by: Gunnar Beutner Signed-off-by: Kyle Fuller Signed-off-by: Richard Yao 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-in= it.patch,v 1.1 2012/07/11 13:20:31 ryao Exp $ =20 depend()