rpms/openafs-kmod/F-16 openafs-1.6.1-0001-Linux-bypass-consolidate-copy_page-macros-into-a-sin.patch, NONE, 1.1 openafs-1.6.1-0002-Linux-3.6-kmap_atomic-API-change.patch, NONE, 1.1 openafs-1.6.1-0003-Linux-3.6-dentry_open-API-change.patch, NONE, 1.1 openafs-1.6.1-0004-Linux-3.6-d_alias-and-i_dentry-are-now-hlists.patch, NONE, 1.1 openafs-1.6.1-0005-Linux-fix-variable-used-to-test-for-the-iop-create-A.patch, NONE, 1.1 openafs-1.6.1-0006-Linux-3.6-create-inode-operation-API-change.patch, NONE, 1.1 openafs-1.6.1-0007-Linux-3.6-revalidate-dentry-op-API-change.patch, NONE, 1.1 openafs-1.6.1-0008-Linux-3.6-lookup-inode-operation-API-change.patch, NONE, 1.1 openafs-1.6.1-clear_inode.patch, NONE, 1.1 openafs-1.6.1-encode_fh.patch, NONE, 1.1 openafs-kmod.spec, 1.64, 1.65

Ken Dreyer ktdreyer at rpmfusion.org
Mon Oct 22 23:03:29 CEST 2012


Author: ktdreyer

Update of /cvs/free/rpms/openafs-kmod/F-16
In directory old02.ovh.rpmfusion.lan:/tmp/cvs-serv5324

Modified Files:
	openafs-kmod.spec 
Added Files:
	openafs-1.6.1-0001-Linux-bypass-consolidate-copy_page-macros-into-a-sin.patch 
	openafs-1.6.1-0002-Linux-3.6-kmap_atomic-API-change.patch 
	openafs-1.6.1-0003-Linux-3.6-dentry_open-API-change.patch 
	openafs-1.6.1-0004-Linux-3.6-d_alias-and-i_dentry-are-now-hlists.patch 
	openafs-1.6.1-0005-Linux-fix-variable-used-to-test-for-the-iop-create-A.patch 
	openafs-1.6.1-0006-Linux-3.6-create-inode-operation-API-change.patch 
	openafs-1.6.1-0007-Linux-3.6-revalidate-dentry-op-API-change.patch 
	openafs-1.6.1-0008-Linux-3.6-lookup-inode-operation-API-change.patch 
	openafs-1.6.1-clear_inode.patch openafs-1.6.1-encode_fh.patch 
Log Message:
* Sat Oct 06 2012 Ken Dreyer <ktdreyer at ktdreyer.com> - 1.6.1-4
- Rebuild for F-18 Beta. Debugging is now disabled in F-18 kernels.


openafs-1.6.1-0001-Linux-bypass-consolidate-copy_page-macros-into-a-sin.patch:
 afs_bypasscache.c |   64 ++++++++++++++++++++----------------------------------
 1 file changed, 24 insertions(+), 40 deletions(-)

--- NEW FILE openafs-1.6.1-0001-Linux-bypass-consolidate-copy_page-macros-into-a-sin.patch ---
>From a9b3e53dcb693182b51e7f5b43586e3e2dc29b8a Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne at gmail.com>
Date: Mon, 13 Aug 2012 20:32:08 -0400
Subject: [PATCH 1/8] Linux: bypass: consolidate copy_page macros into a
 single function

The copy_page(s) macros are very similar; combine them into a
single function that can be used for all cases.

This will make it easier to add some pre-processor logic around
the kmap_atomic calls to adapt to Linux API changes.

Reviewed-on: http://gerrit.openafs.org/7980
Tested-by: BuildBot <buildbot at rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow at dementix.org>
(cherry picked from commit 0a8256a26fafb490b454f2a857b0c15d859572c5)

Change-Id: I6835a024428b26a8cd8d073f6304d0d0b3042b24
---
 src/afs/afs_bypasscache.c | 63 ++++++++++++++++++-----------------------------
 1 file changed, 24 insertions(+), 39 deletions(-)

diff --git a/src/afs/afs_bypasscache.c b/src/afs/afs_bypasscache.c
index e447024..b350233 100644
--- a/src/afs/afs_bypasscache.c
+++ b/src/afs/afs_bypasscache.c
@@ -270,49 +270,12 @@ done:
 #ifdef UKERNEL
 typedef void * bypass_page_t;
 
-#define copy_page(pp, pageoff, rxiov, iovno, iovoff, auio, curiov)	\
-    do { \
-	int dolen = auio->uio_iov[curiov].iov_len - pageoff; \
-	memcpy(((char *)pp) + pageoff,		       \
-	       ((char *)rxiov[iovno].iov_base) + iovoff, dolen);	\
-	auio->uio_resid -= dolen; \
-    } while(0)
-
-#define copy_pages(pp, pageoff, rxiov, iovno, iovoff, auio, curiov)	\
-    do { \
-	int dolen = rxiov[iovno].iov_len - iovoff; \
-	memcpy(((char *)pp) + pageoff,				\
-	       ((char *)rxiov[iovno].iov_base) + iovoff, dolen);	\
-	auio->uio_resid -= dolen;	\
-    } while(0)
-
 #define unlock_and_release_pages(auio)
 #define release_full_page(pp, pageoff)
 
 #else
 typedef struct page * bypass_page_t;
 
-#define copy_page(pp, pageoff, rxiov, iovno, iovoff, auio, curiov)	\
-    do { \
-        char *address;						\
-	int dolen = auio->uio_iov[curiov].iov_len - pageoff; \
-	address = kmap_atomic(pp, KM_USER0); \
-	memcpy(address + pageoff, \
-	       (char *)(rxiov[iovno].iov_base) + iovoff, dolen);	\
-	kunmap_atomic(address, KM_USER0); \
-    } while(0)
-
-#define copy_pages(pp, pageoff, rxiov, iovno, iovoff, auio, curiov)	\
-    do { \
-        char *address; \
-	int dolen = rxiov[iovno].iov_len - iovoff; \
-	address = kmap_atomic(pp, KM_USER0); \
-	memcpy(address + pageoff, \
-	       (char *)(rxiov[iovno].iov_base) + iovoff, dolen);	\
-	kunmap_atomic(address, KM_USER0); \
-    } while(0)
-
-
 #define unlock_and_release_pages(auio) \
     do { \
 	struct iovec *ciov;	\
@@ -347,8 +310,30 @@ typedef struct page * bypass_page_t;
 	    afs_warn("afs_NoCacheFetchProc: page not locked!\n"); \
 	put_page(pp); /* decrement refcount */ \
     } while(0)
+#endif
+
+static void
+afs_bypass_copy_page(bypass_page_t pp, int pageoff, struct iovec *rxiov,
+	int iovno, int iovoff, struct uio *auio, int curiov, int partial)
+{
+    char *address;
+    int dolen;
+
+    if (partial)
+	dolen = rxiov[iovno].iov_len - iovoff;
+    else
+	dolen = auio->uio_iov[curiov].iov_len - pageoff;
 
+#if !defined(UKERNEL)
+    address = kmap_atomic(pp, KM_USER0);
+#else
+    address = pp;
 #endif
+    memcpy(address + pageoff, (char *)(rxiov[iovno].iov_base) + iovoff, dolen);
+#if !defined(UKERNEL)
+    kunmap_atomic(address, KM_USER0);
+#endif
+}
 
 /* no-cache prefetch routine */
 static afs_int32
@@ -447,7 +432,7 @@ afs_NoCacheFetchProc(struct rx_call *acall,
 		if (pageoff + (rxiov[iovno].iov_len - iovoff) <= auio->uio_iov[curpage].iov_len) {
 		    /* Copy entire (or rest of) current iovec into current page */
 		    if (pp)
-			copy_pages(pp, pageoff, rxiov, iovno, iovoff, auio, curpage);
+			afs_bypass_copy_page(pp, pageoff, rxiov, iovno, iovoff, auio, curpage, 0);
 		    length -= (rxiov[iovno].iov_len - iovoff);
 		    pageoff += rxiov[iovno].iov_len - iovoff;
 		    iovno++;
@@ -455,7 +440,7 @@ afs_NoCacheFetchProc(struct rx_call *acall,
 		} else {
 		    /* Copy only what's needed to fill current page */
 		    if (pp)
-			copy_page(pp, pageoff, rxiov, iovno, iovoff, auio, curpage);
+			afs_bypass_copy_page(pp, pageoff, rxiov, iovno, iovoff, auio, curpage, 1);
 		    length -= (auio->uio_iov[curpage].iov_len - pageoff);
 		    iovoff += auio->uio_iov[curpage].iov_len - pageoff;
 		    pageoff = auio->uio_iov[curpage].iov_len;
-- 
1.7.11.4


openafs-1.6.1-0002-Linux-3.6-kmap_atomic-API-change.patch:
 acinclude.m4              |    1 +
 src/afs/afs_bypasscache.c |    8 ++++++++
 src/cf/linux-test4.m4     |   13 ++++++++++++-
 3 files changed, 21 insertions(+), 1 deletion(-)

--- NEW FILE openafs-1.6.1-0002-Linux-3.6-kmap_atomic-API-change.patch ---
>From 2e1c365052d43813ab2c7f5a4d4268c3b03315f0 Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne at gmail.com>
Date: Tue, 14 Aug 2012 16:34:42 -0400
Subject: [PATCH 2/8] Linux 3.6: kmap_atomic API change

kmap_atomic no longer requires a KM_TYPE argument.  Test for this
and adjust the affected code.

Reviewed-on: http://gerrit.openafs.org/7981
Tested-by: BuildBot <buildbot at rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow at dementix.org>
(cherry picked from commit 049c485b4a39ba510035788b4959d839ef668c55)

Change-Id: Iac8be7901da4b277864b1b6cc987cf5087992789
---
 acinclude.m4              |  1 +
 src/afs/afs_bypasscache.c |  8 ++++++++
 src/cf/linux-test4.m4     | 12 ++++++++++++
 3 files changed, 21 insertions(+)

diff --git a/acinclude.m4 b/acinclude.m4
index 25484cf..20fd15e 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -959,6 +959,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
 		 LINUX_IOP_MKDIR_TAKES_UMODE_T
 		 LINUX_IOP_CREATE_TAKES_UMODE_T
 		 LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES
+		 LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE
 
 		 dnl If we are guaranteed that keyrings will work - that is
 		 dnl  a) The kernel has keyrings enabled
diff --git a/src/afs/afs_bypasscache.c b/src/afs/afs_bypasscache.c
index b350233..1138f89 100644
--- a/src/afs/afs_bypasscache.c
+++ b/src/afs/afs_bypasscache.c
@@ -325,13 +325,21 @@ afs_bypass_copy_page(bypass_page_t pp, int pageoff, struct iovec *rxiov,
 	dolen = auio->uio_iov[curiov].iov_len - pageoff;
 
 #if !defined(UKERNEL)
+# if defined(KMAP_ATOMIC_TAKES_NO_KM_TYPE)
+    address = kmap_atomic(pp);
+# else
     address = kmap_atomic(pp, KM_USER0);
+# endif
 #else
     address = pp;
 #endif
     memcpy(address + pageoff, (char *)(rxiov[iovno].iov_base) + iovoff, dolen);
 #if !defined(UKERNEL)
+# if defined(KMAP_ATOMIC_TAKES_NO_KM_TYPE)
+    kunmap_atomic(address);
+# else
     kunmap_atomic(address, KM_USER0);
+# endif
 #endif
 }
 
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
index f13e97d..7db805f 100644
--- a/src/cf/linux-test4.m4
+++ b/src/cf/linux-test4.m4
@@ -675,3 +675,15 @@ AC_DEFUN([LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES], [
 			[define if encode_fh export op takes inode arguments],
 			[-Werror])
 ])
+
+
+AC_DEFUN([LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE], [
+  AC_CHECK_LINUX_BUILD([whether kmap_atomic takes no km_type argument],
+			[ac_cv_linux_kma_atomic_takes_no_km_type],
+			[#include <linux/highmem.h>],
+			[struct page *p = NULL;
+			kmap_atomic(p);],
+			[KMAP_ATOMIC_TAKES_NO_KM_TYPE],
+			[define if kmap_atomic takes no km_type argument],
+			[-Werror])
+])
-- 
1.7.11.4


openafs-1.6.1-0003-Linux-3.6-dentry_open-API-change.patch:
 acinclude.m4               |    1 +
 src/afs/LINUX/osi_compat.h |   16 ++++++++++++++++
 src/afs/LINUX/osi_file.c   |    4 ++--
 src/cf/linux-test4.m4      |   13 ++++++++++++-
 4 files changed, 31 insertions(+), 3 deletions(-)

--- NEW FILE openafs-1.6.1-0003-Linux-3.6-dentry_open-API-change.patch ---
>From a03c03800be47c35a0a95bd88bc1e79fca81460f Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne at gmail.com>
Date: Mon, 13 Aug 2012 21:36:15 -0400
Subject: [PATCH 3/8] Linux 3.6: dentry_open API change

dentry_open now takes a path argument that combines the dentry and
the vfsmount pointers.
Add a configure test and a new compat inline function to keep things
cleaner in the main source file.

Reviewed-on: http://gerrit.openafs.org/7982
Tested-by: BuildBot <buildbot at rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow at dementix.org>
(cherry picked from commit 8766a65e97eb90cb6c97ccd35181c441ece14f8a)

Change-Id: I2c0f59ad9aa6e544a2a613e902933d463f22a5b6
---
 acinclude.m4               |  1 +
 src/afs/LINUX/osi_compat.h | 16 ++++++++++++++++
 src/afs/LINUX/osi_file.c   |  4 ++--
 src/cf/linux-test4.m4      | 12 ++++++++++++
 4 files changed, 31 insertions(+), 2 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 20fd15e..d99c755 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -960,6 +960,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
 		 LINUX_IOP_CREATE_TAKES_UMODE_T
 		 LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES
 		 LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE
+		 LINUX_DENTRY_OPEN_TAKES_PATH
 
 		 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 4c7c261..84fcaa5 100644
--- a/src/afs/LINUX/osi_compat.h
+++ b/src/afs/LINUX/osi_compat.h
@@ -445,4 +445,20 @@ afs_get_dentry_ref(struct path *path, struct vfsmount **mnt, struct dentry **dpp
 #endif
 }
 
+#if defined(STRUCT_TASK_STRUCT_HAS_CRED)
+static inline struct file *
+afs_dentry_open(struct dentry *dp, struct vfsmount *mnt, int flags, const struct cred *creds) {
+#if defined(DENTRY_OPEN_TAKES_PATH)
+    struct path path;
+    struct file *filp;
+    path.mnt = mnt;
+    path.dentry = dp;
+    filp = dentry_open(&path, flags, creds);
+    return filp;
+#else
+    return dentry_open(dp, mntget(mnt), flags, creds);
+#endif
+}
+#endif
+
 #endif /* AFS_LINUX_OSI_COMPAT_H */
diff --git a/src/afs/LINUX/osi_file.c b/src/afs/LINUX/osi_file.c
index 3c20fd9..27806ab 100644
--- a/src/afs/LINUX/osi_file.c
+++ b/src/afs/LINUX/osi_file.c
@@ -56,9 +56,9 @@ afs_linux_raw_open(afs_dcache_id_t *ainode)
 
 #if defined(STRUCT_TASK_STRUCT_HAS_CRED)
     /* Use stashed credentials - prevent selinux/apparmor problems  */
-    filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, cache_creds);
+    filp = afs_dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, cache_creds);
     if (IS_ERR(filp))
-	filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, current_cred());
+	filp = afs_dentry_open(dp, mntget(afs_cacheMnt), O_RDWR, current_cred());
 #else
     filp = dentry_open(dp, mntget(afs_cacheMnt), O_RDWR);
 #endif
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
index 7db805f..427c5e1 100644
--- a/src/cf/linux-test4.m4
+++ b/src/cf/linux-test4.m4
@@ -687,3 +687,15 @@ AC_DEFUN([LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE], [
 			[define if kmap_atomic takes no km_type argument],
 			[-Werror])
 ])
+
+
+AC_DEFUN([LINUX_DENTRY_OPEN_TAKES_PATH], [
+  AC_CHECK_LINUX_BUILD([whether dentry_open takes a path argument],
+			[ac_cv_linux_dentry_open_takes_path],
+			[#include <linux/fs.h>],
+			[struct path p;
+			dentry_open(&p, 0, NULL);],
+			[DENTRY_OPEN_TAKES_PATH],
+			[define if dentry_open takes a path argument],
+			[-Werror])
+])
-- 
1.7.11.4


openafs-1.6.1-0004-Linux-3.6-d_alias-and-i_dentry-are-now-hlists.patch:
 acinclude.m4               |    1 +
 src/afs/LINUX/osi_vcache.c |   12 ++++++++++++
 src/afs/afs_daemons.c      |    5 +++++
 src/cf/linux-test4.m4      |   14 +++++++++++++-
 4 files changed, 31 insertions(+), 1 deletion(-)

--- NEW FILE openafs-1.6.1-0004-Linux-3.6-d_alias-and-i_dentry-are-now-hlists.patch ---
>From 1eaf7b62e12affca7e529b790597fad330da01ee Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne at gmail.com>
Date: Mon, 13 Aug 2012 21:55:25 -0400
Subject: [PATCH 4/8] Linux 3.6: d_alias and i_dentry are now hlists

The d_alias pointer is now the head of an hlist.  This means the
iterator is a different macro and has no "reverse" version since
hlists have no direct pointer to the list tail.

inode->i_dentry gets the same treatment.  Adjust where we use it.

Reviewed-on: http://gerrit.openafs.org/7983
Tested-by: BuildBot <buildbot at rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow at dementix.org>
(cherry picked from commit 6bea047fb404bde828c6358ae06f7941aa2bc959)

Change-Id: I7e7b87e5f5c240f3f0ff25fa723c857ab9d0108c
---
 acinclude.m4               |  1 +
 src/afs/LINUX/osi_vcache.c | 12 ++++++++++++
 src/afs/afs_daemons.c      |  5 +++++
 src/cf/linux-test4.m4      | 13 +++++++++++++
 4 files changed, 31 insertions(+)

diff --git a/acinclude.m4 b/acinclude.m4
index d99c755..d52d149 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -961,6 +961,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
 		 LINUX_EXPORT_OP_ENCODE_FH_TAKES_INODES
 		 LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE
 		 LINUX_DENTRY_OPEN_TAKES_PATH
+		 LINUX_D_ALIAS_IS_HLIST
 
 		 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_vcache.c b/src/afs/LINUX/osi_vcache.c
index e82d78e..cd61c65 100644
--- a/src/afs/LINUX/osi_vcache.c
+++ b/src/afs/LINUX/osi_vcache.c
@@ -19,7 +19,11 @@ osi_TryEvictVCache(struct vcache *avc, int *slept, int defersleep) {
 
     struct dentry *dentry;
     struct inode *inode = AFSTOV(avc);
+#if defined(D_ALIAS_IS_HLIST)
+    struct hlist_node *cur, *head;
+#else
     struct list_head *cur, *head;
+#endif
 
     /* First, see if we can evict the inode from the dcache */
     if (defersleep && avc != afs_globalVp && VREFCOUNT(avc) > 1 && avc->opens == 0) {
@@ -53,12 +57,20 @@ restart:
 	spin_unlock(&dcache_lock);
 #else /* HAVE_DCACHE_LOCK */
 	spin_lock(&inode->i_lock);
+#if defined(D_ALIAS_IS_HLIST)
+	head = inode->i_dentry.first;
+#else
 	head = &inode->i_dentry;
+#endif
 
 restart:
 	cur = head;
 	while ((cur = cur->next) != head) {
+#if defined(D_ALIAS_IS_HLIST)
+	    dentry = hlist_entry(cur, struct dentry, d_alias);
+#else
 	    dentry = list_entry(cur, struct dentry, d_alias);
+#endif
 
 	    spin_lock(&dentry->d_lock);
 	    if (d_unhashed(dentry)) {
diff --git a/src/afs/afs_daemons.c b/src/afs/afs_daemons.c
index 23655e3..f47be0e 100644
--- a/src/afs/afs_daemons.c
+++ b/src/afs/afs_daemons.c
@@ -396,8 +396,13 @@ afs_CheckRootVolume(void)
 		    spin_lock(&dp->d_lock);
 #endif
 #endif
+#if defined(D_ALIAS_IS_HLIST)
+		    hlist_del_init(&dp->d_alias);
+		    hlist_add_head(&dp->d_alias, &(AFSTOV(vcp)->i_dentry));
+#else
 		    list_del_init(&dp->d_alias);
 		    list_add(&dp->d_alias, &(AFSTOV(vcp)->i_dentry));
+#endif
 		    dp->d_inode = AFSTOV(vcp);
 #if defined(AFS_LINUX24_ENV)
 #if defined(AFS_LINUX26_ENV)
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
index 427c5e1..6b70059 100644
--- a/src/cf/linux-test4.m4
+++ b/src/cf/linux-test4.m4
@@ -699,3 +699,16 @@ AC_DEFUN([LINUX_DENTRY_OPEN_TAKES_PATH], [
 			[define if dentry_open takes a path argument],
 			[-Werror])
 ])
+
+
+AC_DEFUN([LINUX_D_ALIAS_IS_HLIST], [
+  AC_CHECK_LINUX_BUILD([whether dentry->d_alias is an hlist],
+			[ac_cv_linux_d_alias_is_hlist],
+			[#include <linux/fs.h>],
+			[struct dentry *d = NULL;
+			struct hlist_node *hn = NULL;
+			d->d_alias = *hn;],
+			[D_ALIAS_IS_HLIST],
+			[define if dentry->d_alias is an hlist],
+			[])
+])
-- 
1.7.11.4


openafs-1.6.1-0005-Linux-fix-variable-used-to-test-for-the-iop-create-A.patch:
 osi_vnodeops.c |    3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

--- NEW FILE openafs-1.6.1-0005-Linux-fix-variable-used-to-test-for-the-iop-create-A.patch ---
>From 439897bfcf7dbf4dc4f6967b69ca399252a54e29 Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne at gmail.com>
Date: Tue, 14 Aug 2012 17:11:08 -0400
Subject: [PATCH 5/8] Linux: fix variable used to test for the iop create API

Use correct variable when testing for the create API to use.

This is just for looks - there is no effect since mkdir and create
were changed in the same kernel release.

Reviewed-on: http://gerrit.openafs.org/7984
Reviewed-by: Alistair Ferguson <alistair.ferguson at mac.com>
Tested-by: BuildBot <buildbot at rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow at dementix.org>
(cherry picked from commit c633a92a1bc7881f18ee641082ff2efe7da1a8cb)

Change-Id: Ib23fe9a34bc07227614c149b0f16d3b0a067501b
---
 src/afs/LINUX/osi_vnodeops.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/afs/LINUX/osi_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 4cda547..b3bf115 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -1094,7 +1094,7 @@ struct dentry_operations afs_dentry_operations = {
  * name is in kernel space at this point.
  */
 static int
-#if defined(IOP_MKDIR_TAKES_UMODE_T)
+#if defined(IOP_CREATE_TAKES_UMODE_T)
 afs_linux_create(struct inode *dip, struct dentry *dp, umode_t mode,
 		 struct nameidata *nd)
 #else
-- 
1.7.11.4


openafs-1.6.1-0006-Linux-3.6-create-inode-operation-API-change.patch:
 acinclude.m4                 |    1 +
 src/afs/LINUX/osi_vnodeops.c |    9 +++++----
 src/cf/linux-test4.m4        |   16 +++++++++++++++-
 3 files changed, 21 insertions(+), 5 deletions(-)

--- NEW FILE openafs-1.6.1-0006-Linux-3.6-create-inode-operation-API-change.patch ---
>From 3e27f1e2e7302f0f87c03d5e174b1754379fb66e Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne at gmail.com>
Date: Tue, 14 Aug 2012 17:28:50 -0400
Subject: [PATCH 6/8] Linux 3.6: create inode operation API change

The nameidata argument is dropped and a flag is added.

Reviewed-on: http://gerrit.openafs.org/7985
Tested-by: BuildBot <buildbot at rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow at dementix.org>
(cherry picked from commit 020e32779c103817ca89caa51259fb53bc3dde79)

Change-Id: Iae2a0301a1c4acb6835eb0bdca6ae22b143b2cda
---
 acinclude.m4                 |  1 +
 src/afs/LINUX/osi_vnodeops.c |  9 +++++----
 src/cf/linux-test4.m4        | 15 +++++++++++++++
 3 files changed, 21 insertions(+), 4 deletions(-)

diff --git a/acinclude.m4 b/acinclude.m4
index d52d149..1c84354 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -962,6 +962,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
 		 LINUX_KMAP_ATOMIC_TAKES_NO_KM_TYPE
 		 LINUX_DENTRY_OPEN_TAKES_PATH
 		 LINUX_D_ALIAS_IS_HLIST
+		 LINUX_IOP_I_CREATE_TAKES_BOOL
 
 		 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_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index b3bf115..8c8045b 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -1094,17 +1094,18 @@ struct dentry_operations afs_dentry_operations = {
  * name is in kernel space at this point.
  */
 static int
-#if defined(IOP_CREATE_TAKES_UMODE_T)
+#if defined(IOP_CREATE_TAKES_BOOL)
+afs_linux_create(struct inode *dip, struct dentry *dp, umode_t mode,
+		 bool excl)
+#elif defined(IOP_CREATE_TAKES_UMODE_T)
 afs_linux_create(struct inode *dip, struct dentry *dp, umode_t mode,
 		 struct nameidata *nd)
-#else
-#ifdef IOP_CREATE_TAKES_NAMEIDATA
+#elif defined(IOP_CREATE_TAKES_NAMEIDATA)
 afs_linux_create(struct inode *dip, struct dentry *dp, int mode,
 		 struct nameidata *nd)
 #else
 afs_linux_create(struct inode *dip, struct dentry *dp, int mode)
 #endif
-#endif
 {
     struct vattr vattr;
     cred_t *credp = crref();
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
index 6b70059..dc30770 100644
--- a/src/cf/linux-test4.m4
+++ b/src/cf/linux-test4.m4
@@ -712,3 +712,18 @@ AC_DEFUN([LINUX_D_ALIAS_IS_HLIST], [
 			[define if dentry->d_alias is an hlist],
 			[])
 ])
+
+
+AC_DEFUN([LINUX_IOP_I_CREATE_TAKES_BOOL], [
+  AC_CHECK_LINUX_BUILD([whether inode_operations.create takes a bool],
+			[ac_cv_linux_func_i_create_takes_bool],
+			[#include <linux/fs.h>
+			#include <linux/namei.h>],
+			[struct inode _inode = {};
+			struct dentry _dentry;
+			bool b = true;
+			(void)_inode.i_op->create(&_inode, &_dentry, 0, b);],
+		       [IOP_CREATE_TAKES_BOOL],
+		       [define if your iops.create takes a bool argument],
+		       [-Werror])
+])
-- 
1.7.11.4


openafs-1.6.1-0007-Linux-3.6-revalidate-dentry-op-API-change.patch:
 acinclude.m4                 |    1 +
 src/afs/LINUX/osi_vnodeops.c |    8 +++++++-
 src/cf/linux-test4.m4        |   15 ++++++++++++++-
 3 files changed, 22 insertions(+), 2 deletions(-)

--- NEW FILE openafs-1.6.1-0007-Linux-3.6-revalidate-dentry-op-API-change.patch ---
>From 57f3a2bbe873dae41bc57130a5985e8c334a5303 Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne at gmail.com>
Date: Tue, 14 Aug 2012 18:08:51 -0400
Subject: [PATCH 7/8] Linux 3.6: revalidate dentry op API change

The nameidata argument is dropped, replaced by an unsigned flags
value.  The configure test is very specific; kernels with the
older API with a signed int flags value should fall through.

Reviewed-on: http://gerrit.openafs.org/7986
Tested-by: BuildBot <buildbot at rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow at dementix.org>
(cherry picked from commit 7413cd09a53f89882a46fd100bf6c501348f2188)

Change-Id: Ie68d70dcf414d24e7e980c8a8f35b83550d2da7c
---
 acinclude.m4                 |  1 +
 src/afs/LINUX/osi_vnodeops.c |  8 +++++++-
 src/cf/linux-test4.m4        | 14 ++++++++++++++
 3 files changed, 22 insertions(+), 1 deletion(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 1c84354..8bb5bf7 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -963,6 +963,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
 		 LINUX_DENTRY_OPEN_TAKES_PATH
 		 LINUX_D_ALIAS_IS_HLIST
 		 LINUX_IOP_I_CREATE_TAKES_BOOL
+		 LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED
 
 		 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_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 8c8045b..49f8b96 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -906,7 +906,9 @@ afs_linux_getattr(struct vfsmount *mnt, struct dentry *dentry, struct kstat *sta
  * later on, we shouldn't have to do it until later. Perhaps in the future..
  */
 static int
-#ifdef DOP_REVALIDATE_TAKES_NAMEIDATA
+#if defined(DOP_REVALIDATE_TAKES_UNSIGNED)
+afs_linux_dentry_revalidate(struct dentry *dp, unsigned int flags)
+#elif defined(DOP_REVALIDATE_TAKES_NAMEIDATA)
 afs_linux_dentry_revalidate(struct dentry *dp, struct nameidata *nd)
 #else
 afs_linux_dentry_revalidate(struct dentry *dp, int flags)
@@ -921,7 +923,11 @@ afs_linux_dentry_revalidate(struct dentry *dp, int flags)
 
 #ifdef LOOKUP_RCU
     /* We don't support RCU path walking */
+# if defined(DOP_REVALIDATE_TAKES_UNSIGNED)
+    if (flags & LOOKUP_RCU)
+# else
     if (nd->flags & LOOKUP_RCU)
+# endif
        return -ECHILD;
 #endif
     AFS_GLOCK();
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
index dc30770..4a6ec02 100644
--- a/src/cf/linux-test4.m4
+++ b/src/cf/linux-test4.m4
@@ -727,3 +727,17 @@ AC_DEFUN([LINUX_IOP_I_CREATE_TAKES_BOOL], [
 		       [define if your iops.create takes a bool argument],
 		       [-Werror])
 ])
+
+
+AC_DEFUN([LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED], [
+  AC_CHECK_LINUX_BUILD([whether dentry_operations.d_revalidate takes an unsigned int],
+			[ac_cv_linux_func_d_revalidate_takes_unsigned],
+			[#include <linux/fs.h>
+			#include <linux/namei.h>],
+			[struct dentry_operations dops;
+			int reval(struct dentry *d, unsigned int i) { return 0; };
+			dops.d_revalidate = reval;],
+		       [DOP_REVALIDATE_TAKES_UNSIGNED],
+		       [define if your dops.d_revalidate takes an unsigned int argument],
+		       [-Werror])
+])
-- 
1.7.11.4


openafs-1.6.1-0008-Linux-3.6-lookup-inode-operation-API-change.patch:
 acinclude.m4                 |    1 +
 src/afs/LINUX/osi_vnodeops.c |    5 ++++-
 src/cf/linux-test4.m4        |   15 ++++++++++++++-
 3 files changed, 19 insertions(+), 2 deletions(-)

--- NEW FILE openafs-1.6.1-0008-Linux-3.6-lookup-inode-operation-API-change.patch ---
>From a131b915fec5ca7679c092af2031ac20e9e78658 Mon Sep 17 00:00:00 2001
From: Marc Dionne <marc.c.dionne at gmail.com>
Date: Tue, 14 Aug 2012 18:26:24 -0400
Subject: [PATCH 8/8] Linux 3.6: lookup inode operation API change

The nameidata argument is replaced with an unsigned int flags
argument.

Reviewed-on: http://gerrit.openafs.org/7987
Tested-by: BuildBot <buildbot at rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow at dementix.org>
(cherry picked from commit ec48dca871ef98adb69792a34047c6be5818f1b2)

Change-Id: Ic8be26141ede6e1c4062872c79a846efb0045bda
---
 acinclude.m4                 |  1 +
 src/afs/LINUX/osi_vnodeops.c |  5 ++++-
 src/cf/linux-test4.m4        | 14 ++++++++++++++
 3 files changed, 19 insertions(+), 1 deletion(-)

diff --git a/acinclude.m4 b/acinclude.m4
index 8bb5bf7..4b49449 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -964,6 +964,7 @@ case $AFS_SYSNAME in *_linux* | *_umlinux*)
 		 LINUX_D_ALIAS_IS_HLIST
 		 LINUX_IOP_I_CREATE_TAKES_BOOL
 		 LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED
+		 LINUX_IOP_LOOKUP_TAKES_UNSIGNED
 
 		 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_vnodeops.c b/src/afs/LINUX/osi_vnodeops.c
index 49f8b96..c376bd1 100644
--- a/src/afs/LINUX/osi_vnodeops.c
+++ b/src/afs/LINUX/osi_vnodeops.c
@@ -1147,7 +1147,10 @@ afs_linux_create(struct inode *dip, struct dentry *dp, int mode)
 
 /* afs_linux_lookup */
 static struct dentry *
-#ifdef IOP_LOOKUP_TAKES_NAMEIDATA
+#if defined(IOP_LOOKUP_TAKES_UNSIGNED)
+afs_linux_lookup(struct inode *dip, struct dentry *dp,
+		 unsigned flags)
+#elif defined(IOP_LOOKUP_TAKES_NAMEIDATA)
 afs_linux_lookup(struct inode *dip, struct dentry *dp,
 		 struct nameidata *nd)
 #else
diff --git a/src/cf/linux-test4.m4 b/src/cf/linux-test4.m4
index 4a6ec02..fc0149f 100644
--- a/src/cf/linux-test4.m4
+++ b/src/cf/linux-test4.m4
@@ -741,3 +741,17 @@ AC_DEFUN([LINUX_DOP_D_REVALIDATE_TAKES_UNSIGNED], [
 		       [define if your dops.d_revalidate takes an unsigned int argument],
 		       [-Werror])
 ])
+
+
+AC_DEFUN([LINUX_IOP_LOOKUP_TAKES_UNSIGNED], [
+  AC_CHECK_LINUX_BUILD([whether inode operation lookup takes an unsigned int],
+			[ac_cv_linux_func_lookup_takes_unsigned],
+			[#include <linux/fs.h>
+			#include <linux/namei.h>],
+			[struct inode_operations iops;
+			struct dentry *look(struct inode *i, struct dentry *d, unsigned int j) { return NULL; };
+			iops.lookup = look;],
+		       [IOP_LOOKUP_TAKES_UNSIGNED],
+		       [define if your iops.lookup takes an unsigned int argument],
+		       [-Werror])
+])
-- 
1.7.11.4


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 at 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 at dementix.org>
Tested-by: BuildBot <buildbot at 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 at 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 at rampaginggeek.com>
Reviewed-by: Derrick Brashear <shadow at 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-16/openafs-kmod.spec,v
retrieving revision 1.64
retrieving revision 1.65
diff -u -r1.64 -r1.65
--- openafs-kmod.spec	18 Oct 2012 18:43:04 -0000	1.64
+++ openafs-kmod.spec	22 Oct 2012 21:03:29 -0000	1.65
@@ -21,7 +21,7 @@
 Name:           %{kmod_name}-kmod
 
 Version:        1.6.1
-Release:        1%{?dist}.24
+Release:        4%{?dist}
 Summary:        Kernel module(s)
 
 Group:          System Environment/Kernel
@@ -31,6 +31,46 @@
 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 kernel 3.5
+Patch0:         openafs-1.6.1-clear_inode.patch
+Patch1:         openafs-1.6.1-encode_fh.patch
+
+# Upstream patches to build on kernel 3.6. In-progress in Gerrit.
+# Steps to create these patches:
+# 1) git clone from openafs.org
+# 2) git checkout openafs-stable-1_6_1
+# 3) git checkout -b fedora
+# 4) Get the two Patches above (patch0 and patch1)
+#    git cherry-pick -x cc63cbbc138f60d6b5964fa859dcd778717b24c2
+#    git cherry-pick -x 407e7c90a97143d436ad3a6af6bbfa431c849191 
+# 5) Take note of the commit hash here.
+# 6) Cherry-pick the appropriate patches from Gerrit onto this "fedora" branch
+#    When cherry-picking "d_alias and i_dentry are now hlists"
+#    (http://gerrit.openafs.org/8080), avoid the post-1.6.1 canonical_dentry()
+#    function from http://gerrit.openafs.org/7951 .
+# 7) Create the patch files
+#     git format-patch <hash in step 5>
+#     If you forgot the hash from step 5, look with "git log --oneline"
+# 8) Rename patche files according to Fedora package guidelines:
+#     for i in $(ls *.patch); do mv $i openafs-1.6.1-$i; done
+
+# http://gerrit.openafs.org/8077
+Patch4: openafs-1.6.1-0001-Linux-bypass-consolidate-copy_page-macros-into-a-sin.patch
+# http://gerrit.openafs.org/8078
+Patch5: openafs-1.6.1-0002-Linux-3.6-kmap_atomic-API-change.patch
+# http://gerrit.openafs.org/8079
+Patch6: openafs-1.6.1-0003-Linux-3.6-dentry_open-API-change.patch
+# http://gerrit.openafs.org/8080
+Patch7: openafs-1.6.1-0004-Linux-3.6-d_alias-and-i_dentry-are-now-hlists.patch
+# http://gerrit.openafs.org/8081
+Patch8: openafs-1.6.1-0005-Linux-fix-variable-used-to-test-for-the-iop-create-A.patch
+# http://gerrit.openafs.org/8082
+Patch9: openafs-1.6.1-0006-Linux-3.6-create-inode-operation-API-change.patch
+# http://gerrit.openafs.org/8083
+Patch10: openafs-1.6.1-0007-Linux-3.6-revalidate-dentry-op-API-change.patch
+# http://gerrit.openafs.org/8084
+Patch11: openafs-1.6.1-0008-Linux-3.6-lookup-inode-operation-API-change.patch
+
 %global AkmodsBuildRequires %{_bindir}/kmodtool, pam-devel, ncurses-devel, flex, byacc, bison, automake
 BuildRequires: %{AkmodsBuildRequires}
 
@@ -56,8 +96,21 @@
 %setup -q -c -T -a 0
 
 # apply patches and do other stuff here
-#pushd %{kmod_name}-%{version}
-#popd
+pushd %{kmod_name}-%{version}
+# Kernel 3.5 patches
+%patch0 -p1
+%patch1 -p1
+# Kernel 3.6 patches
+%patch4 -p1
+%patch5 -p1
+%patch6 -p1
+%patch7 -p1
+%patch8 -p1
+%patch9 -p1
+%patch10 -p1
+%patch11 -p1
+./regen.sh
+popd
 
 for kernel_version in %{?kernel_versions} ; do
     cp -a %{kmod_name}-%{version} _kmod_build_${kernel_version%%___*}
@@ -94,74 +147,14 @@
 
 
 %changelog
-* Thu Oct 18 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.24
-- Rebuilt for updated kernel
-
-* Wed Oct 17 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.23
-- Rebuilt for updated kernel
-
-* Thu Oct 11 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.22
-- Rebuilt for updated kernel
-
-* Wed Oct 03 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.21
-- Rebuilt for updated kernel
-
-* Mon Sep 17 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.20
-- Rebuilt for updated kernel
-
-* Sun Aug 26 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.19
-- Rebuilt for updated kernel
-
-* Thu Aug 16 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.18
-- Rebuilt for updated kernel
-
-* Tue Jul 31 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.17
-- Rebuilt for updated kernel
-
-* Thu Jul 26 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.16
-- Rebuilt for updated kernel
-
-* Tue Jul 17 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.15
-- Rebuilt for updated kernel
-
-* Fri Jul 06 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.14
-- Rebuilt for updated kernel
-
-* Thu Jun 28 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.13
-- Rebuilt for updated kernel
-
-* Sun Jun 17 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.12
-- Rebuilt for updated kernel
-
-* Tue Jun 05 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.11
-- Rebuilt for updated kernel
+* Sat Oct 06 2012 Ken Dreyer <ktdreyer at ktdreyer.com> - 1.6.1-4
+- Rebuild for F-18 Beta. Debugging is now disabled in F-18 kernels.
 
-* Wed May 23 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.10
-- Rebuilt for updated kernel
+* Wed Sep 19 2012 Ken Dreyer <ktdreyer at ktdreyer.com> - 1.6.1-3
+- Add upstream patches for kernel 3.6
 
-* Fri May 18 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.9
-- Rebuilt for release kernel
-
-* Wed May 09 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.8
-- rebuild for updated kernel
-
-* Fri May 04 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.7
-- rebuild for updated kernel
-
-* Wed May 02 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.6
-- rebuild for updated kernel
-
-* Sun Apr 22 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.4
-- rebuild for updated kernel
-
-* Mon Apr 16 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.3
-- rebuild for updated kernel
-
-* Thu Apr 12 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.2
-- rebuild for updated kernel
-
-* Sat Apr 07 2012 Nicolas Chauvet <kwizart at gmail.com> - 1.6.1-1.1
-- rebuild for updated kernel
+* Wed Aug 01 2012 Ken Dreyer <ktdreyer at ktdreyer.com> - 1.6.1-2
+- Add upstream patches for kernel 3.5
 
 * Wed Apr 04 2012 Ken Dreyer <ktdreyer at ktdreyer.com> - 1.6.1-1
 - Update to OpenAFS 1.6.1 final


More information about the rpmfusion-commits mailing list