Author: jjneely
Update of /cvs/free/rpms/openafs-kmod/devel
In directory se02.es.rpmfusion.net:/tmp/cvs-serv19465
Modified Files:
.cvsignore openafs-kmod.spec sources
Added Files:
0001-Linux-2.6.39-deal-with-BKL-removal.patch
0002-Linux-2.6.39-replace-path_lookup-with-kern_path.patch
Log Message:
* Thu Apr 14 2011 Jack Neely <jjneely(a)ncsu.edu> 0:1.6.0-0.pre4
- Update to OpenAFS 1.6.0 pre-release 4
- Applied 0001-Linux-2.6.39-deal-with-BKL-removal.patch and
0002-Linux-2.6.39-replace-path_lookup-with-kern_path.patch
to get the kmod to build on current F15 kernels.
0001-Linux-2.6.39-deal-with-BKL-removal.patch:
afs/LINUX/osi_export.c | 1 -
afs/LINUX/osi_file.c | 1 -
afs/LINUX/osi_groups.c | 2 --
afs/LINUX/osi_misc.c | 1 -
afs/LINUX/osi_nfssrv.c | 1 -
afs/LINUX/osi_vfsops.c | 1 -
afs/LINUX/osi_vnodeops.c | 1 -
afs/afs_call.c | 3 ---
afs/afs_icl.c | 3 ---
afs/afs_pag_call.c | 3 ---
afs/afs_syscall.c | 3 ---
rx/LINUX/rx_knet.c | 2 --
12 files changed, 22 deletions(-)
--- NEW FILE 0001-Linux-2.6.39-deal-with-BKL-removal.patch ---
From 1e322b883e036fe0bd5468fe60a0431545fe2376 Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne(a)gmail.com>
Date: Sun, 27 Mar 2011 11:20:17 -0400
Subject: [PATCH 1/4] Linux: 2.6.39: deal with BKL removal
For 2.6 kernels the OpenAFS code is already BKL free, but the
corresponding header file smp_lock.h is still included in various
places. This header no longer exists, so remove all occurrences
outside of LINUX24.
Reviewed-on:
http://gerrit.openafs.org/4361
Tested-by: BuildBot <buildbot(a)rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow(a)dementia.org>
(cherry picked from commit 9376293634393597ac7db88593100937621f6c3f)
Change-Id: I8e7e244b2e45a7a3af0505531757b8a54a0b3d29
Reviewed-on:
http://gerrit.openafs.org/4370
Tested-by: BuildBot <buildbot(a)rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow(a)dementia.org>
---
src/afs/LINUX/osi_export.c | 1 -
src/afs/LINUX/osi_file.c | 1 -
src/afs/LINUX/osi_groups.c | 2 --
src/afs/LINUX/osi_misc.c | 1 -
src/afs/LINUX/osi_nfssrv.c | 1 -
src/afs/LINUX/osi_vfsops.c | 1 -
src/afs/LINUX/osi_vnodeops.c | 1 -
src/afs/afs_call.c | 3 ---
src/afs/afs_icl.c | 3 ---
src/afs/afs_pag_call.c | 3 ---
src/afs/afs_syscall.c | 3 ---
src/rx/LINUX/rx_knet.c | 1 -
12 files changed, 0 insertions(+), 21 deletions(-)
diff --git a/src/afs/LINUX/osi_export.c b/src/afs/LINUX/osi_export.c
index 5b300e0..662966b 100644
--- a/src/afs/LINUX/osi_export.c
+++ b/src/afs/LINUX/osi_export.c
@@ -23,7 +23,6 @@
#include "afs/sysincludes.h"
#include "afsincludes.h"
#include "afs/afs_dynroot.h"
-#include <linux/smp_lock.h>
#if !defined(AFS_NONFSTRANS)
diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c
index 4a28da6..fbd20e9 100644
--- a/src/afs/LINUX/osi_file.c
+++ b/src/afs/LINUX/osi_file.c
@@ -15,7 +15,6 @@
#include "afs/sysincludes.h" /* Standard vendor system headers */
#include "afsincludes.h" /* Afs-based standard headers */
#include "afs/afs_stats.h" /* afs statistics */
-#include <linux/smp_lock.h>
#include <linux/namei.h>
#if defined(HAVE_LINUX_EXPORTFS_H)
diff --git a/src/afs/LINUX/osi_groups.c b/src/afs/LINUX/osi_groups.c
index 7561ecc..144f0e3 100644
--- a/src/afs/LINUX/osi_groups.c
+++ b/src/afs/LINUX/osi_groups.c
@@ -26,8 +26,6 @@
#include "afs/nfsclient.h"
#include "osi_compat.h"
-#include <linux/smp_lock.h>
-
#ifdef AFS_LINUX26_ONEGROUP_ENV
# define NUMPAGGROUPS 1
diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c
index e2af595..79fa763 100644
--- a/src/afs/LINUX/osi_misc.c
+++ b/src/afs/LINUX/osi_misc.c
@@ -22,7 +22,6 @@
#include "afs/sysincludes.h"
#include "afsincludes.h"
#include "afs/afs_stats.h"
-#include <linux/smp_lock.h>
int afs_osicred_initialized = 0;
afs_ucred_t afs_osi_cred;
diff --git a/src/afs/LINUX/osi_nfssrv.c b/src/afs/LINUX/osi_nfssrv.c
index 4c0553b..cde4b9b 100644
--- a/src/afs/LINUX/osi_nfssrv.c
+++ b/src/afs/LINUX/osi_nfssrv.c
@@ -21,7 +21,6 @@
#include "afs/sysincludes.h"
#include "afsincludes.h"
#include "nfsclient.h"
-#include <linux/smp_lock.h>
#include <linux/sunrpc/svc.h>
#include <linux/sunrpc/svcauth.h>
diff --git a/src/afs/LINUX/osi_vfsops.c b/src/afs/LINUX/osi_vfsops.c
index 921efac..8abe6b1 100644
--- a/src/afs/LINUX/osi_vfsops.c
+++ b/src/afs/LINUX/osi_vfsops.c
@@ -21,7 +21,6 @@
#include "afs/sysincludes.h"
#include "afsincludes.h"
#include "afs/afs_stats.h"
-#include <linux/smp_lock.h>
#include "osi_compat.h"
diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index f3ba62a..d8d23b5 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -30,7 +30,6 @@
#include <linux/mm_inline.h>
#endif
#include <linux/pagemap.h>
-#include <linux/smp_lock.h>
#include <linux/writeback.h>
#include <linux/pagevec.h>
#include "afs/lock.h"
diff --git a/src/afs/afs_call.c b/src/afs/afs_call.c
index 5c1538e..f2778fe 100644
--- a/src/afs/afs_call.c
+++ b/src/afs/afs_call.c
@@ -24,9 +24,6 @@
#include "netinet/in_var.h"
#endif
#endif /* !defined(UKERNEL) */
-#ifdef AFS_LINUX22_ENV
-#include "h/smp_lock.h"
-#endif
#ifdef AFS_SUN510_ENV
#include "h/ksynch.h"
#include "h/sunddi.h"
diff --git a/src/afs/afs_icl.c b/src/afs/afs_icl.c
index c8547ef..7c3d175 100644
--- a/src/afs/afs_icl.c
+++ b/src/afs/afs_icl.c
@@ -24,9 +24,6 @@
#include "netinet/in_var.h"
#endif
#endif /* !defined(UKERNEL) */
-#ifdef AFS_LINUX22_ENV
-#include "h/smp_lock.h"
-#endif
struct afs_icl_set *afs_iclSetp = (struct afs_icl_set *)0;
diff --git a/src/afs/afs_pag_call.c b/src/afs/afs_pag_call.c
index b1ea882..d61a91c 100644
--- a/src/afs/afs_pag_call.c
+++ b/src/afs/afs_pag_call.c
@@ -25,9 +25,6 @@
#include "netinet/in_var.h"
#endif
#endif /* !defined(UKERNEL) */
-#ifdef AFS_LINUX22_ENV
-#include "h/smp_lock.h"
-#endif
#include "rmtsys.h"
#include "pagcb.h"
diff --git a/src/afs/afs_syscall.c b/src/afs/afs_syscall.c
index b6f6337..8ad59e9 100644
--- a/src/afs/afs_syscall.c
+++ b/src/afs/afs_syscall.c
@@ -28,9 +28,6 @@
#include "netinet/in_var.h"
#endif
#endif /* !defined(UKERNEL) */
-#ifdef AFS_LINUX22_ENV
-#include "h/smp_lock.h"
-#endif
#if (defined(AFS_AIX51_ENV) && defined(AFS_64BIT_KERNEL)) ||
defined(AFS_HPUX_64BIT_ENV) || defined(AFS_SUN57_64BIT_ENV) || (defined(AFS_SGI_ENV)
&& (_MIPS_SZLONG==64)) || defined(NEED_IOCTL32)
static void
diff --git a/src/rx/LINUX/rx_knet.c b/src/rx/LINUX/rx_knet.c
index 590a060..942a072 100644
--- a/src/rx/LINUX/rx_knet.c
+++ b/src/rx/LINUX/rx_knet.c
@@ -18,7 +18,6 @@
#include <linux/version.h>
#include "rx/rx_kcommon.h"
-#include "h/smp_lock.h"
#include <asm/uaccess.h>
#ifdef ADAPT_PMTU
#include <linux/errqueue.h>
--
1.7.4.1
0002-Linux-2.6.39-replace-path_lookup-with-kern_path.patch:
acinclude.m4 | 3 +++
src/afs/LINUX/osi_compat.h | 31 +++++++++++++++++++++++++++++++
src/afs/LINUX/osi_misc.c | 22 +++++++---------------
3 files changed, 41 insertions(+), 15 deletions(-)
--- NEW FILE 0002-Linux-2.6.39-replace-path_lookup-with-kern_path.patch ---
From a8aa6f4221309f44f49cdd00acce88122f1753f6 Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne(a)gmail.com>
Date: Sun, 27 Mar 2011 10:59:55 -0400
Subject: [PATCH 2/4] Linux: 2.6.39: replace path_lookup with kern_path
path_lookup is no longer available, use kern_path instead.
Reviewed-on:
http://gerrit.openafs.org/4360
Tested-by: BuildBot <buildbot(a)rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow(a)dementia.org>
(cherry picked from commit 7d162266c4958b22cc45d65e3f204a96c218e5f6)
Change-Id: I1c2aba273d1d597346ecb92f75caed6b6d624454
Reviewed-on:
http://gerrit.openafs.org/4371
Tested-by: BuildBot <buildbot(a)rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow(a)dementia.org>
---
acinclude.m4 | 3 +++
src/afs/LINUX/osi_compat.h | 31 +++++++++++++++++++++++++++++++
src/afs/LINUX/osi_misc.c | 21 +++++++--------------
3 files changed, 41 insertions(+), 14 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index 51f2f6d..1f3e498 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -848,6 +848,9 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
AC_CHECK_LINUX_FUNC([pagevec_lru_add_file],
[#include <linux/pagevec.h>],
[__pagevec_lru_add_file(NULL);])
+ AC_CHECK_LINUX_FUNC([path_lookup],
+ [#include <linux/namei.h>],
+ [path_lookup(NULL, 0, NULL);])
AC_CHECK_LINUX_FUNC([rcu_read_lock],
[#include <linux/rcupdate.h>],
[rcu_read_lock();])
diff --git a/src/afs/LINUX/osi_compat.h b/src/afs/LINUX/osi_compat.h
index cee3ade..e4f0735 100644
--- a/src/afs/LINUX/osi_compat.h
+++ b/src/afs/LINUX/osi_compat.h
@@ -403,4 +403,35 @@ afs_inode_setattr(struct osi_file *afile, struct iattr *newattrs) {
return code;
}
+static inline int
+afs_kern_path(char *aname, int flags, struct nameidata *nd, struct path *path) {
+#if defined(HAVE_LINUX_PATH_LOOKUP)
+ return path_lookup(aname, flags, nd);
+#else
+ return kern_path(aname, flags, path);
+#endif
+}
+
+static inline void
+afs_get_dentry_ref(struct nameidata *nd, struct path *path, struct vfsmount **mnt, struct
dentry **dpp) {
+#if defined(STRUCT_NAMEIDATA_HAS_PATH)
+# if defined(HAVE_LINUX_PATH_LOOKUP)
+ *dpp = dget(nd->path.dentry);
+ if (mnt)
+ *mnt = mntget(nd->path.mnt);
+ path_put(&nd->path);
+# else
+ *dpp = dget(path->dentry);
+ if (mnt)
+ *mnt = mntget(path->mnt);
+ path_put(path);
+# endif
+#else
+ *dpp = dget(nd->dentry);
+ if (mnt)
+ *mnt = mntget(nd->mnt);
+ path_release(nd);
+#endif
+}
+
#endif /* AFS_LINUX_OSI_COMPAT_H */
diff --git a/src/afs/LINUX/osi_misc.c b/src/afs/LINUX/osi_misc.c
index 79fa763..1158304 100644
--- a/src/afs/LINUX/osi_misc.c
+++ b/src/afs/LINUX/osi_misc.c
@@ -23,6 +23,8 @@
#include "afsincludes.h"
#include "afs/afs_stats.h"
+#include "osi_compat.h"
+
int afs_osicred_initialized = 0;
afs_ucred_t afs_osi_cred;
@@ -58,26 +60,17 @@ osi_lookupname_internal(char *aname, int followlink, struct vfsmount
**mnt,
{
int code;
struct nameidata nd;
+ struct path path;
int flags = LOOKUP_POSITIVE;
code = ENOENT;
if (followlink)
flags |= LOOKUP_FOLLOW;
- code = path_lookup(aname, flags, &nd);
+ code = afs_kern_path(aname, flags, &nd, &path);
+
+ if (!code)
+ afs_get_dentry_ref(&nd, &path, mnt, dpp);
- if (!code) {
-#if defined(STRUCT_NAMEIDATA_HAS_PATH)
- *dpp = dget(nd.path.dentry);
- if (mnt)
- *mnt = mntget(nd.path.mnt);
- path_put(&nd.path);
-#else
- *dpp = dget(nd.dentry);
- if (mnt)
- *mnt = mntget(nd.mnt);
- path_release(&nd);
-#endif
- }
return code;
}
--
1.7.4.1
Index: .cvsignore
===================================================================
RCS file: /cvs/free/rpms/openafs-kmod/devel/.cvsignore,v
retrieving revision 1.1
retrieving revision 1.2
diff -u -r1.1 -r1.2
--- .cvsignore 22 Nov 2009 14:01:18 -0000 1.1
+++ .cvsignore 14 Apr 2011 17:08:08 -0000 1.2
@@ -0,0 +1 @@
+openafs-1.6.0pre4-src.tar.bz2
Index: openafs-kmod.spec
===================================================================
RCS file: /cvs/free/rpms/openafs-kmod/devel/openafs-kmod.spec,v
retrieving revision 1.2
retrieving revision 1.3
diff -u -r1.2 -r1.3
--- openafs-kmod.spec 11 Jan 2011 18:40:20 -0000 1.2
+++ openafs-kmod.spec 14 Apr 2011 17:08:08 -0000 1.3
@@ -19,22 +19,24 @@
%define kmod_name openafs
+%define pre pre4
+
# name should have a -kmod suffix
Name: %{kmod_name}-kmod
-Version: 1.4.14
-Release: 1%{?dist}
+Version: 1.6.0
+Release: 0.%{pre}%{?dist}
Summary: Kernel module(s)
Group: System Environment/Kernel
License: IBM
URL:
http://www.openafs.org
-Source0:
http://www.openafs.org/dl/openafs/%{version}/%{kmod_name}-%{version}-src....
+Source0:
http://www.openafs.org/dl/openafs/%{version}/%{kmod_name}-%{version}%{pre...
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
BuildRequires: %{_bindir}/kmodtool
-BuildRequires: pam-devel, ncurses-devel, flex, byacc, bison
+BuildRequires: pam-devel, ncurses-devel, flex, byacc, bison, automake
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: i586 i686 x86_64 ppc ppc64
@@ -43,6 +45,9 @@
# tracks in all the kernel-devel packages
BuildRequires: %{_bindir}/kmodtool
+Patch1: 0001-Linux-2.6.39-deal-with-BKL-removal.patch
+Patch2: 0002-Linux-2.6.39-replace-path_lookup-with-kern_path.patch
+
%{!?kernels:BuildRequires:
buildsys-build-rpmfusion-kerneldevpkgs-%{?buildforkernels:%{buildforkernels}}%{!?buildforkernels:current}-%{_target_cpu}
}
# kmodtool does its magic here
@@ -62,12 +67,13 @@
%setup -q -c -T -a 0
# apply patches and do other stuff here
-# pushd foo-%{version}
-# #patch0 -p1 -b .suffix
-# popd
+pushd %{kmod_name}-%{version}%{pre}
+%patch1 -p1
+%patch2 -p1
+popd
for kernel_version in %{?kernel_versions} ; do
- cp -a %{kmod_name}-%{version} _kmod_build_${kernel_version%%___*}
+ cp -a %{kmod_name}-%{version}%{pre} _kmod_build_${kernel_version%%___*}
done
@@ -102,6 +108,12 @@
%changelog
+* Thu Apr 14 2011 Jack Neely <jjneely(a)ncsu.edu> 0:1.6.0-0.pre4
+- Update to OpenAFS 1.6.0 pre-release 4
+- Applied 0001-Linux-2.6.39-deal-with-BKL-removal.patch and
+ 0002-Linux-2.6.39-replace-path_lookup-with-kern_path.patch
+ to get the kmod to build on current F15 kernels.
+
* Tue Jan 11 2011 Jack Neely <jjneely(a)ncsu.edu> 0:1.4.14-1
- Build 1.4.14
Index: sources
===================================================================
RCS file: /cvs/free/rpms/openafs-kmod/devel/sources,v
retrieving revision 1.3
retrieving revision 1.4
diff -u -r1.3 -r1.4
--- sources 11 Jan 2011 18:40:20 -0000 1.3
+++ sources 14 Apr 2011 17:08:08 -0000 1.4
@@ -1 +1 @@
-e26d2e894999a18a47a9cf8bbfbaadb2 openafs-1.4.14-src.tar.bz2
+f0f34f75d539b495bd89523ac9774fde openafs-1.6.0pre4-src.tar.bz2