[OpenAFS] openafs problem on Solaris 8

Chas Williams chas@cmf.nrl.navy.mil
Sat, 13 Jan 2001 13:27:49 -0500


In message <20010113160420.B1125@guitar.cs.ust.hk>,Dominic Lai writes:
>have WS 5.0 in hand right now. :(  ).  The binaries work on some platforms,
>but not on other platforms.

interesting.  i am using:

bashir.2% cc -V
cc: Sun WorkShop 6 2000/04/07 C 5.1

>It seems that the compiled kernel binary only crashes on SuperSparc chip.
>But when using your compiled kernel binary, it works on my SparcStation 20.
>This convinces me that it seems to be the problem of Workshop 5.0.  :-(

after applying the kernel patch i noticed i had to make the following
changes to get a clean compile.  the big change would seem to be
int32 to size_t for the afs_putapage function.  for some arches (like v9),
this would be 64 bits.  apply these patches and see if it clears up your
problem with the supersparc.

>Thanks Chas for the kind advices.

we aim to please.

Index: osi_prototypes.h
===================================================================
RCS file: /afs/cmf/project/cvsroot/openafs/src/afs/SOLARIS/osi_prototypes.h,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- osi_prototypes.h	2001/01/04 15:41:17	1.1.1.2
+++ osi_prototypes.h	2001/01/12 15:35:04	1.2
@@ -17,7 +17,12 @@
 #else
 		 u_int *offp,
 #endif
-		 u_int *lenp, int flags, struct AFS_UCRED *credp);
+#if     defined(AFS_SUN58_ENV)
+		 size_t *lenp,
+#else
+		 u_int *lenp,
+#endif
+		 int flags, struct AFS_UCRED *credp);
 
 
 
===================================================================
RCS file: /afs/cmf/project/cvsroot/openafs/src/afs/SOLARIS/osi_vnodeops.c,v
retrieving revision 1.1.1.2
retrieving revision 1.2
diff -u -r1.1.1.2 -r1.2
--- osi_vnodeops.c	2001/01/04 15:41:19	1.1.1.2
+++ osi_vnodeops.c	2001/01/12 15:35:05	1.2
@@ -379,7 +379,11 @@
 	 * As of 4/98, that shouldn't be possible, but we'll be defensive here
 	 * in case someone tries to relax all the serialization of read and write
 	 * operations with harmless things like stat. */
+#if	defined(AFS_SUN58_ENV)
+	page = page_create_va(vp, toffset, PAGESIZE, PG_WAIT|PG_EXCL, seg, addr);
+#else
 	page = page_create_va(vp, toffset, PAGESIZE, PG_WAIT|PG_EXCL, seg->s_as, addr);
+#endif
 #else
 	page = page_create(vp, toffset, PAGESIZE, PG_WAIT);
 #endif
@@ -537,7 +541,12 @@
     struct vcache *avc;
     struct page *pages;
     afs_int32 code = 0;
-    afs_int32 tlen, endPos, NPages=0;
+#if	defined(AFS_SUN58_ENV)
+    size_t tlen;
+#else
+    afs_int32 tlen;
+#endif
+    afs_int32 endPos, NPages=0;
 #if	defined(AFS_SUN56_ENV)
     u_offset_t toff = off;
 #else
@@ -615,7 +624,12 @@
 #else
 		 u_int *offp,
 #endif
-		 u_int *lenp, int flags, struct AFS_UCRED *credp)
+#if	defined(AFS_SUN58_ENV)
+		 size_t *lenp,
+#else
+		 u_int *lenp,
+#endif
+		 int flags, struct AFS_UCRED *credp)
 {
     struct buf *tbuf;
     struct vcache *avc = (struct vcache *)vp;