[OpenAFS] Linux kernel panic, OpenAFS client, gconf

Jan-Marc Pilawa j.pilawa@tu-bs.de
Fri, 18 Jun 2004 00:16:03 +0200


On Thursday 17 June 2004 17:14, chas williams (contractor) wrote:
> >applied a patch from Chas Williams for osi_vnodeops.c, but it is almost
> > the same. The Situation is improved sofar that in some cases afsd seems
> > to hang and the applications produce very high load, because they can't
> > access afs.
>
> which patch?  the following seemed to help my gconf related crashes.

This Patch. Miles Davis forwared this patch to me. Seems to be a previous 
version. (I'll apply your newer patch in about 8 hours)
---snipp---
--- osi_vnodeops.c
+++ osi_vnodeops.c
@@ -753,6 +753,7 @@
     struct vcache *parentvcp = ITOAFS(dp->d_parent->d_inode);

     AFS_GLOCK();
+    lock_kernel();

     sysState.allocked = 0;

@@ -802,14 +803,15 @@
     if (sysState.allocked)
         osi_FreeLargeSpace(name);

-    AFS_GUNLOCK();
-    crfree(credp);
-
     if (bad_dentry) {
         shrink_dcache_parent(dp);
         d_drop(dp);
     }

+    unlock_kernel();
+    AFS_GUNLOCK();
+    crfree(credp);
+
     return !bad_dentry;
 }
---snapp---


>
> --- openafs-1.2.11.orig/src/afs/LINUX/osi_vnodeops.c	2003-01-16
> 20:30:37.000000000 -0500 +++
> openafs-1.2.11/src/afs/LINUX/osi_vnodeops.c	2004-06-02 11:55:05.000000000
> -0400 @@ -749,12 +749,15 @@
>      struct vcache *lookupvcp = NULL;
>      int code, bad_dentry = 1;
>      struct sysname_info sysState;
> -    struct vcache *vcp = ITOAFS(dp->d_inode);
> -    struct vcache *parentvcp = ITOAFS(dp->d_parent->d_inode);
> +    struct vcache *vcp, *parentvcp;
> +
> +    sysState.allocked = 0;
>
>      AFS_GLOCK();
> +    lock_kernel();
>
> -    sysState.allocked = 0;
> +    vcp = ITOAFS(dp->d_inode);
> +    parentvcp = ITOAFS(dp->d_parent->d_inode);
>
>      /* If it's a negative dentry, then there's nothing to do. */
>      if (!vcp || !parentvcp)
> @@ -802,14 +805,15 @@
>      if (sysState.allocked)
>          osi_FreeLargeSpace(name);
>
> -    AFS_GUNLOCK();
> -    crfree(credp);
> -
>      if (bad_dentry) {
>          shrink_dcache_parent(dp);
>          d_drop(dp);
>      }
>
> +    unlock_kernel();
> +    AFS_GUNLOCK();
> +    crfree(credp);
> +
>      return !bad_dentry;
>  }
>
> _______________________________________________
> OpenAFS-info mailing list
> OpenAFS-info@openafs.org
> https://lists.openafs.org/mailman/listinfo/openafs-info