[OpenAFS] openafs-1.0.2 on SuperSPARC (Solaris 8 32Bit)

Chas Williams chas@cmf.nrl.navy.mil
Wed, 31 Jan 2001 13:50:43 -0500


>Where is the difference? :)
>Andreas

well.. i found some 2 other diffs that my sources dont have.  since you
are having a problem with 'large directories' i would suspect the bulk
fetching addition in the second diffs.  but with afs you can never tell.  
i will put the version of these files i am using in
ftp://ftp.cmf.nrl.navy.mil/pub/chas/openafs/sun4x_58 
see if replacing either makes a difference.


diff -u -r foo/openafs-1.0.2/src/afs/VNOPS/afs_vnop_attrs.c projects/openafs/src/afs/VNOPS/afs_vnop_attrs.c
--- foo/openafs-1.0.2/src/afs/VNOPS/afs_vnop_attrs.c	Fri Jan 19 04:46:06 2001
+++ projects/openafs/src/afs/VNOPS/afs_vnop_attrs.c	Sat Nov  4 11:23:49 2000
@@ -1,10 +1,9 @@
+/* Copyright (C) 1995, 1989, 1998 Transarc Corporation - All rights reserved */
+
 /*
- * Copyright 2000, International Business Machines Corporation and others.
- * All Rights Reserved.
- * 
- * This software has been released under the terms of the IBM Public
- * License.  For details, see the LICENSE file in the top-level source
- * directory or online at http://www.openafs.org/dl/license10.html
+ * For copyright information, see IPL which you accepted in order to
+ * download this software.
+ *
  */
 
 /*
@@ -187,13 +186,6 @@
     AFS_STATCNT(afs_getattr);
     afs_Trace2(afs_iclSetp, CM_TRACE_GETATTR, ICL_TYPE_POINTER, avc, 
 	       ICL_TYPE_INT32, avc->m.Length);
-
-#if defined(AFS_SUN5_ENV)
-    if (flags & ATTR_HINT) {
-       code = afs_CopyOutAttrs(avc, attrs);
-       return code;
-    }
-#endif
 
 #if defined(AFS_SUN_ENV) || defined(AFS_ALPHA_ENV) || defined(AFS_SUN5_ENV)
     afs_BozonLock(&avc->pvnLock, avc);
diff -u -r foo/openafs-1.0.2/src/afs/VNOPS/afs_vnop_lookup.c projects/openafs/src/afs/VNOPS/afs_vnop_lookup.c
--- foo/openafs-1.0.2/src/afs/VNOPS/afs_vnop_lookup.c	Fri Jan 19 04:29:42 2001
+++ projects/openafs/src/afs/VNOPS/afs_vnop_lookup.c	Sat Nov  4 11:23:49 2000
@@ -1,13 +1,13 @@
+/* Copyright (C) 1995, 1989, 1998 Transarc Corporation - All rights reserved */
+
 /*
- * Copyright 2000, International Business Machines Corporation and others.
- * All Rights Reserved.
- * 
- * This software has been released under the terms of the IBM Public
- * License.  For details, see the LICENSE file in the top-level source
- * directory or online at http://www.openafs.org/dl/license10.html
+ * For copyright information, see IPL which you accepted in order to
+ * download this software.
+ *
  */
 
-/*
+/* afs_vnop_lookup.c
+ *
  * Implements:
  * afs_lookup
  * EvalMountPoint
@@ -325,12 +325,8 @@
 #if (defined(AFS_SGI62_ENV) || defined(AFS_SUN57_64BIT_ENV))
 extern int BlobScan(ino64_t *afile, afs_int32 ablob);
 #else
-#if defined AFS_LINUX_64BIT_KERNEL
-extern int BlobScan(long *afile, afs_int32 ablob);
-#else
 extern int BlobScan(afs_int32 *afile, afs_int32 ablob);
 #endif
-#endif
 
 
 /* called with an unlocked directory and directory cookie.  Areqp
@@ -641,7 +637,6 @@
       /* actually a serious error, probably should panic. Probably will 
        * panic soon, oh well. */
       ReleaseReadLock(&afs_xvcache);
-      afs_warnuser("afs_DoBulkStat: VLRU empty!");
       goto done;
     }
     if ((VLRU.next->prev != &VLRU) || (VLRU.prev->next != &VLRU)) {
@@ -744,15 +739,12 @@
 	   refpanic ("Bulkstat VLRU inconsistent6");
 	ReleaseWriteLock(&afs_xvcache);
 
-	ObtainWriteLock(&afs_xcbhash, 494);
-
 	/* We need to check the flags again. We may have missed
 	 * something while we were waiting for a lock.
 	 */
 	if (!(tvcp->states & CBulkFetching) || (tvcp->m.Length != statSeqNo)) {
 	    flagIndex++;
 	    ReleaseWriteLock(&tvcp->lock);
-	    ReleaseWriteLock(&afs_xcbhash);
 	    afs_PutVCache(tvcp);
 	    continue;
 	}
@@ -768,6 +760,19 @@
 	else if (vType(tvcp) == VLNK)
 	    tvcp->v.v_op = &afs_symlink_iops;
 #endif
+
+	ObtainWriteLock(&afs_xcbhash, 494);
+
+	/* We need to check the flags once more. We may have missed
+	 * something while we were waiting for a lock.
+	 */
+	if (!(tvcp->states & CBulkFetching) || (tvcp->m.Length != statSeqNo)) {
+	    flagIndex++;
+	    ReleaseWriteLock(&afs_xcbhash);
+	    ReleaseWriteLock(&tvcp->lock);
+	    afs_PutVCache(tvcp);
+	    continue;
+	}
 
 	/* do some accounting for bulk stats: mark this entry as
 	 * loaded, so we can tell if we use it before it gets