[Pkg-zfsonlinux-devel] [SCM] zfs branch, master, updated. debian/0.6.5.7-2-17-ge0859ee

Petter Reinholdtsen pere at hungry.com
Thu Dec 15 21:01:36 UTC 2016


The following commit has been merged in the master branch:
commit e0859ee1fbe334c1626ec7bb5440f8b81caafcd7
Author: Petter Reinholdtsen <pere at hungry.com>
Date:   Thu Dec 15 20:55:24 2016 +0000

    Added patch 1003-linux-4.9-compat.patch from upstream to build with Linux kernel 4.9.
    
    Closes: #847018

diff --git a/debian/patches/1003-linux-4.9-compat.patch b/debian/patches/1003-linux-4.9-compat.patch
new file mode 100644
index 0000000..eb5abe8
--- /dev/null
+++ b/debian/patches/1003-linux-4.9-compat.patch
@@ -0,0 +1,98 @@
+Description: Fix dkms build problem with linux 2.9
+ Commit 3b0ba3ba99b8a3af0fb532bf264629436b1abd84 fetched from upstream
+ and refreshed to apply cleanly.
+Author: Brian Behlendorf <behlendorf1 at llnl.gov>
+Debian-Bug: https://bugs.debian.org/847018
+Forwarded: no
+Reviewed-By: Petter Reinholdtsen <pere at hungry.com>
+Last-Update: 2016-12-15
+
+commit 3b0ba3ba99b8a3af0fb532bf264629436b1abd84
+Author: Brian Behlendorf <behlendorf1 at llnl.gov>
+Date:   Tue Oct 18 23:49:23 2016 +0000
+
+    Linux 4.9 compat: inode_change_ok() renamed setattr_prepare()
+    
+    In torvalds/linux at 31051c8 the inode_change_ok() function was
+    renamed setattr_prepare() and updated to take a dentry ratheri
+    than an inode.  Update the code to call the setattr_prepare()
+    and add a wrapper function which call inode_change_ok() for
+    older kernels.
+    
+    Signed-off-by: Brian Behlendorf <behlendorf1 at llnl.gov>
+    Signed-off-by: Chunwei Chen <david.chen at osnexus.com>
+    Requires-spl: refs/pull/581/head
+
+Index: zfs/config/kernel-setattr-prepare.m4
+===================================================================
+--- /dev/null	1970-01-01 00:00:00.000000000 +0000
++++ zfs/config/kernel-setattr-prepare.m4	2016-12-15 20:52:14.223657574 +0000
+@@ -0,0 +1,23 @@
++dnl #
++dnl # 4.9 API change
++dnl # The inode_change_ok() function has been renamed setattr_prepare()
++dnl # and updated to take a dentry rather than an inode.
++dnl #
++AC_DEFUN([ZFS_AC_KERNEL_SETATTR_PREPARE],
++	[AC_MSG_CHECKING([whether setattr_prepare() is available])
++	ZFS_LINUX_TRY_COMPILE_SYMBOL([
++		#include <linux/fs.h>
++	], [
++		struct dentry *dentry = NULL;
++		struct iattr *attr = NULL;
++		int error;
++
++		error = setattr_prepare(dentry, attr);
++	], [setattr_prepare], [fs/attr.c], [
++		AC_MSG_RESULT(yes)
++		AC_DEFINE(HAVE_SETATTR_PREPARE, 1,
++		    [setattr_prepare() is available])
++	], [
++		AC_MSG_RESULT(no)
++	])
++])
+Index: zfs/config/kernel.m4
+===================================================================
+--- zfs.orig/config/kernel.m4	2016-12-15 20:52:14.227657605 +0000
++++ zfs/config/kernel.m4	2016-12-15 20:52:14.223657574 +0000
+@@ -71,6 +71,7 @@
+ 	ZFS_AC_KERNEL_ENCODE_FH_WITH_INODE
+ 	ZFS_AC_KERNEL_COMMIT_METADATA
+ 	ZFS_AC_KERNEL_CLEAR_INODE
++	ZFS_AC_KERNEL_SETATTR_PREPARE
+ 	ZFS_AC_KERNEL_INSERT_INODE_LOCKED
+ 	ZFS_AC_KERNEL_D_MAKE_ROOT
+ 	ZFS_AC_KERNEL_D_OBTAIN_ALIAS
+Index: zfs/include/linux/vfs_compat.h
+===================================================================
+--- zfs.orig/include/linux/vfs_compat.h	2016-12-15 20:52:14.227657605 +0000
++++ zfs/include/linux/vfs_compat.h	2016-12-15 20:52:14.223657574 +0000
+@@ -362,4 +362,15 @@
+ #define	zpl_follow_up(path)			follow_up(path)
+ #endif
+ 
++/*
++ * 4.9 API change
++ */
++#ifndef HAVE_SETATTR_PREPARE
++static inline int
++setattr_prepare(struct dentry *dentry, struct iattr *ia)
++{
++	return (inode_change_ok(dentry->d_inode, ia));
++}
++#endif
++
+ #endif /* _ZFS_VFS_H */
+Index: zfs/module/zfs/zpl_inode.c
+===================================================================
+--- zfs.orig/module/zfs/zpl_inode.c	2016-12-15 20:52:14.227657605 +0000
++++ zfs/module/zfs/zpl_inode.c	2016-12-15 20:52:14.223657574 +0000
+@@ -320,7 +320,7 @@
+ 	int error;
+ 	fstrans_cookie_t cookie;
+ 
+-	error = inode_change_ok(ip, ia);
++	error = setattr_prepare(dentry, ia);
+ 	if (error)
+ 		return (error);
+ 
diff --git a/debian/patches/series b/debian/patches/series
index 37d9781..086d2b0 100644
--- a/debian/patches/series
+++ b/debian/patches/series
@@ -5,3 +5,4 @@
 1002-fix-mips-build.patch
 enable-zed.patch
 1001-cmd-python-exec-path.patch
+1003-linux-4.9-compat.patch

-- 
OpenZFS on Linux



More information about the Pkg-zfsonlinux-devel mailing list