Author: ktdreyer
Update of /cvs/free/rpms/openafs-kmod/F-17
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv23784
Modified Files:
openafs-kmod.spec
Added Files:
openafs-1.6.1-clear_inode.patch openafs-1.6.1-encode_fh.patch
Log Message:
* Wed Aug 01 2012 Ken Dreyer <ktdreyer(a)ktdreyer.com> - 1.6.1-2
- Add upstream patches for kernel 3.5
openafs-1.6.1-clear_inode.patch:
acinclude.m4 | 3 +++
src/afs/LINUX/osi_vfsops.c | 5 ++++-
2 files changed, 7 insertions(+), 1 deletion(-)
--- NEW FILE openafs-1.6.1-clear_inode.patch ---
From cc63cbbc138f60d6b5964fa859dcd778717b24c2 Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne(a)gmail.com>
Date: Mon, 28 May 2012 21:43:12 -0400
Subject: [PATCH] Linux 3.4: replace end_writeback with clear_inode
end_writeback() is renamed to clear_inode(). Add a configure test
and cope.
Change-Id: Icaf5b6b54d0ee377fabcf0b295d690eaa6b4be5e
Reviewed-on:
http://gerrit.openafs.org/7503
Reviewed-by: Derrick Brashear <shadow(a)dementix.org>
Tested-by: BuildBot <buildbot(a)rampaginggeek.com>
(cherry picked from commit 2b33384a4a7b88842281021129ffccc837d91d36)
Reviewed-on:
http://gerrit.openafs.org/7578
---
acinclude.m4 | 3 +++
src/afs/LINUX/osi_vfsops.c | 4 ++++
2 files changed, 7 insertions(+), 0 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index 45f06cb..9085afe 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -840,6 +840,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
#include <linux/page-flags.h>],
[struct page *_page;
int bchecked = PageFsMisc(_page);])
+ AC_CHECK_LINUX_FUNC([clear_inode],
+ [#include <linux/fs.h>],
+ [clear_inode(NULL);])
AC_CHECK_LINUX_FUNC([current_kernel_time],
[#include <linux/time.h>],
[struct timespec s;
diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c
index a6be1b3..bc951a2 100644
--- a/src/afs/LINUX/osi_vfsops.c
+++ b/src/afs/LINUX/osi_vfsops.c
@@ -284,7 +284,11 @@ afs_evict_inode(struct inode *ip)
osi_Panic("inode freed while still hashed");
truncate_inode_pages(&ip->i_data, 0);
+#if defined(HAVE_LINUX_CLEAR_INODE)
+ clear_inode(ip);
+#else
end_writeback(ip);
+#endif
#if !defined(STRUCT_SUPER_OPERATIONS_HAS_ALLOC_INODE)
afs_osi_Free(ip->u.generic_ip, sizeof(struct vcache));
--
1.7.2.5
openafs-1.6.1-encode_fh.patch:
acinclude.m4 | 1 +
src/afs/LINUX/osi_compat.h | 4 ++++
src/cf/linux-test4.m4 | 15 ++++++++++++++-
3 files changed, 19 insertions(+), 1 deletion(-)
--- NEW FILE openafs-1.6.1-encode_fh.patch ---
From 407e7c90a97143d436ad3a6af6bbfa431c849191 Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne(a)gmail.com>
Date: Sat, 2 Jun 2012 21:35:53 -0400
Subject: [PATCH] Linux 3.5: encode_fh API change
The encode_fh export operation now expects two inode arguments
instead of a dentry and a "connectable" flag. Use the inode of
the dentry we're interested in, and NULL as the parent inode which
is the same as passing a 0 flag in the previous API.
Change-Id: I05cf146fb2a4bacdca20a9f108d04ccb11530804
Reviewed-on:
http://gerrit.openafs.org/7523
Tested-by: BuildBot <buildbot(a)rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow(a)dementix.org>
(cherry picked from commit 5227148ae17949705487ea673d558ebfe143e635)
Reviewed-on:
http://gerrit.openafs.org/7579
---
acinclude.m4 | 1 +
src/afs/LINUX/osi_compat.h | 4 ++++
src/cf/linux-test4.m4 | 14 ++++++++++++++
3 files changed, 19 insertions(+), 0 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index c14b581..25484cf 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -958,6 +958,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
LINUX_D_COUNT_IS_INT
LINUX_IOP_MKDIR_TAKES_UMODE_T
LINUX_IOP_CREATE_TAKES_UMODE_T
+ LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES
dnl If we are guaranteed that keyrings will work - that is
dnl a) The kernel has keyrings enabled
diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h
index b94295c..4c7c261 100644
--- a/src/afs/LINUX/osi_compat.h
+++ b/src/afs/LINUX/osi_compat.h
@@ -333,7 +333,11 @@ afs_get_dentry_from_fh(struct super_block *afs_cacheSBp,
afs_dcache_id_t *ainode
static inline int
afs_get_fh_from_dentry(struct dentry *dp, afs_ufs_dcache_id_t *ainode, int *max_lenp) {
if (dp->d_sb->s_export_op->encode_fh)
+#if defined(EXPORT_OP_ENCODE_FH_TAKES_INODES)
+ return dp->d_sb->s_export_op->encode_fh(dp->d_inode,
&ainode->raw[0], max_lenp, NULL);
+#else
return dp->d_sb->s_export_op->encode_fh(dp, &ainode->raw[0],
max_lenp, 0);
+#endif
#if defined(NEW_EXPORT_OPS)
/* If fs doesn't provide an encode_fh method, assume the default INO32 type */
*max_lenp = sizeof(struct fid)/4;
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
index f5e91b1..f13e97d 100644
--- a/src/cf/linux-test4.m4
+++ b/src/cf/linux-test4.m4
@@ -661,3 +661,17 @@ AC_DEFUN([LINUX_IOP_CREATE_TAKES_UMODE_T], [
[define if inode.i_op->create takes a umode_t argument],
[-Werror])
])
+
+
+AC_DEFUN([LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES], [
+ AC_CHECK_LINUX_BUILD([whether export operation encode_fh takes inode arguments],
+ [ac_cv_linux_export_op_encode_fh__takes_inodes],
+ [#include <linux/exportfs.h>],
+ [struct export_operations _exp_ops;
+ int _encode_fh(struct inode *i, __u32 *fh, int *len, struct inode *p)
+ {return 0;};
+ _exp_ops.encode_fh = _encode_fh;],
+ [EXPORT_OP_ENCODE_FH_TAKES_INODES],
+ [define if encode_fh export op takes inode arguments],
+ [-Werror])
+])
--
1.7.2.5
Index: openafs-kmod.spec
===================================================================
RCS file: /cvs/free/rpms/openafs-kmod/F-17/openafs-kmod.spec,v
retrieving revision 1.39
retrieving revision 1.40
diff -u -r1.39 -r1.40
--- openafs-kmod.spec 31 Jul 2012 06:35:59 -0000 1.39
+++ openafs-kmod.spec 2 Aug 2012 07:42:42 -0000 1.40
@@ -21,7 +21,7 @@
Name: %{kmod_name}-kmod
Version: 1.6.1
-Release: 1%{?dist}.19
+Release: 2%{?dist}
Summary: Kernel module(s)
Group: System Environment/Kernel
@@ -31,6 +31,10 @@
Source0:
http://dl.openafs.org/dl/%{version}/%{kmod_name}-%{version}-src.tar.bz2
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
+# Upstream patches to build on newer kernels
+Patch0: openafs-1.6.1-clear_inode.patch
+Patch1: openafs-1.6.1-encode_fh.patch
+
%global AkmodsBuildRequires %{_bindir}/kmodtool, pam-devel, ncurses-devel, flex, byacc,
bison, automake
BuildRequires: %{AkmodsBuildRequires}
@@ -56,8 +60,11 @@
%setup -q -c -T -a 0
# apply patches and do other stuff here
-#pushd %{kmod_name}-%{version}
-#popd
+pushd %{kmod_name}-%{version}
+%patch0 -p1
+%patch1 -p1
+./regen.sh
+popd
for kernel_version in %{?kernel_versions} ; do
cp -a %{kmod_name}-%{version} _kmod_build_${kernel_version%%___*}
@@ -94,6 +101,9 @@
%changelog
+* Wed Aug 01 2012 Ken Dreyer <ktdreyer(a)ktdreyer.com> - 1.6.1-2
+- Add upstream patches for kernel 3.5
+
* Tue Jul 31 2012 Nicolas Chauvet <kwizart(a)gmail.com> - 1.6.1-1.19
- Rebuilt for updated kernel