[OpenAFS] Linux 2.6.10-rc2 - still no luck

Helmut Jarausch jarausch@igpm.rwth-aachen.de
Thu, 09 Dec 2004 09:27:54 +0100 (CET)


--Boundary_(ID_lhnQN7ycyO3oeRW6zDDgHA)
Content-type: TEXT/PLAIN; CHARSET=us-ascii
Content-transfer-encoding: 7BIT
Content-disposition: INLINE

Hi all,

with help by Derrick, I managed to build openafs (cvs-041208) for my
linux 2.6.10-rc2 - see below.

Trying to load the daemon still fails, I get
afsd: Cannot find "unregister_filesystem" in file /proc/ksyms
Guessing prefix from output of uname -v
Failed to load AFS client, not starting AFS services.

What's happening now?

Having read about the cache filling problem with Linux 2.6.x in
addition, is there much hope that OpenAFS could be used on such
a system within the next few month?
I have problems with USB2 and SATA support under recent 2.4.x kernels,
furthermore I'd like to use reiser4.
Just bad luck for me?

Thanks for your comments.

The attached patch is against the cvs-version from
2004/12/08 8:41 GMT

I've put all changes under
#if defined(AFS_LINUX26_ENV)
assuming the Linux kernel developers won't revoked the changes
which required these patches.

-- 
Helmut Jarausch

Lehrstuhl fuer Numerische Mathematik
RWTH - Aachen University
D 52056 Aachen, Germany

--Boundary_(ID_lhnQN7ycyO3oeRW6zDDgHA)
Content-type: TEXT/PLAIN; NAME=openafs-cvs-041208.DIFF
Content-transfer-encoding: 7BIT
Content-disposition: ATTACHMENT; FILENAME=openafs-cvs-041208.DIFF

diff -ur openafs-cvs-041208-ORIG/src/afs/LINUX/osi_misc.c openafs-cvs-041208/src/afs/LINUX/osi_misc.c
--- openafs-cvs-041208-ORIG/src/afs/LINUX/osi_misc.c	2004-12-02 09:04:35.000000000 +0100
+++ openafs-cvs-041208/src/afs/LINUX/osi_misc.c	2004-12-08 09:50:40.000000000 +0100
@@ -23,8 +23,11 @@
 #if defined(AFS_LINUX24_ENV)
 #include "h/smp_lock.h"
 #endif
+#define CURRENT_RLIM  current->rlim
 #if defined(AFS_LINUX26_ENV)
 #include "h/namei.h"
+#undef  CURRENT_RLIM
+#define CURRENT_RLIM  current->signal->rlim
 #endif
 
 #if defined(AFS_LINUX24_ENV)
@@ -138,8 +141,8 @@
     } else
 	filp->f_pos = offset;
 
-    savelim = current->rlim[RLIMIT_FSIZE].rlim_cur;
-    current->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
+    savelim = CURRENT_RLIM[RLIMIT_FSIZE].rlim_cur;
+    CURRENT_RLIM[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
 
     /* Read/Write the data. */
     TO_USER_SPACE();
@@ -151,7 +154,7 @@
 	code = asize;
     TO_KERNEL_SPACE();
 
-    current->rlim[RLIMIT_FSIZE].rlim_cur = savelim;
+    CURRENT_RLIM[RLIMIT_FSIZE].rlim_cur = savelim;
 
     if (code >= 0) {
 	*resid = asize - code;
@@ -173,8 +176,8 @@
     int count;
     unsigned long savelim;
 
-    savelim = current->rlim[RLIMIT_FSIZE].rlim_cur;
-    current->rlim[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
+    savelim = CURRENT_RLIM[RLIMIT_FSIZE].rlim_cur;
+    CURRENT_RLIM[RLIMIT_FSIZE].rlim_cur = RLIM_INFINITY;
 
     if (uiop->uio_seg == AFS_UIOSYS)
 	TO_USER_SPACE();
@@ -217,7 +220,7 @@
     if (uiop->uio_seg == AFS_UIOSYS)
 	TO_KERNEL_SPACE();
 
-    current->rlim[RLIMIT_FSIZE].rlim_cur = savelim;
+    CURRENT_RLIM[RLIMIT_FSIZE].rlim_cur = savelim;
 
     return code;
 }
diff -ur openafs-cvs-041208-ORIG/src/afs/LINUX/osi_vnodeops.c openafs-cvs-041208/src/afs/LINUX/osi_vnodeops.c
--- openafs-cvs-041208-ORIG/src/afs/LINUX/osi_vnodeops.c	2004-12-02 09:04:35.000000000 +0100
+++ openafs-cvs-041208/src/afs/LINUX/osi_vnodeops.c	2004-12-08 09:51:56.000000000 +0100
@@ -1795,7 +1795,11 @@
 struct inode_operations afs_symlink_iops = {
 #if defined(AFS_LINUX24_ENV)
   .readlink = 		page_readlink,
+ #if defined(AFS_LINUX26_ENV)
+  .follow_link =	page_follow_link_light,
+ #else
   .follow_link =	page_follow_link,
+ #endif
   .setattr =		afs_notify_change,
 #else
   .readlink = 		afs_linux_readlink,
diff -ur openafs-cvs-041208-ORIG/src/afs/afs_osi.c openafs-cvs-041208/src/afs/afs_osi.c
--- openafs-cvs-041208-ORIG/src/afs/afs_osi.c	2004-12-02 09:04:35.000000000 +0100
+++ openafs-cvs-041208/src/afs/afs_osi.c	2004-12-08 09:46:19.000000000 +0100
@@ -860,13 +860,21 @@
 #endif
 #ifdef DEFINED_FOR_EACH_PROCESS
     for_each_process(p) if (p->pid) {
+#if defined(AFS_LINUX26_ENV)
+	if (p->state & EXIT_ZOMBIE)
+#else
 	if (p->state & TASK_ZOMBIE)
+#endif
 	    continue;
 	afs_GCPAGs_perproc_func(p);
     }
 #else
     for_each_task(p) if (p->pid) {
+#if defined(AFS_LINUX26_ENV)
+	if (p->state & EXIT_ZOMBIE)
+#else
 	if (p->state & TASK_ZOMBIE)
+#endif
 	    continue;
 	afs_GCPAGs_perproc_func(p);
     }

--Boundary_(ID_lhnQN7ycyO3oeRW6zDDgHA)--