> So finally: Has anyone already created some patches to either the
> OpenAFS sources or the SuSE 7.0 kernel sources in order to compile
> OpenAFS successfully? 
I've attached a patch which I believe will allow compilation on SuSE
systems. I don't actually have any, and my attempts at using kernel
headers extracted from SuSE rpms was not very successful, so I don't know
that it will work.... The kernel patches in question do not have to do
with large memory machine as much as supporting large files in the
filesystem. (needless to say, afs does not support large files, so my
patch did not actually add 64bit interfaces to afs, it merely extracts the
32 bit values it has always used.) 

In addition, I also adjusted an AFS structure that needs to be kept in
sync with a linux struct inode. I would appreciate finding out if this
works for you so I can consider submitting it to the openafs-gatekeeper
(well, once I figure out how to identify LFS-patched kernels in a way
other than #ifdef _REISER_FS_I)
diff -ru 028/libafs-O1.0/afs/osi_vfs.h 029/libafs-O1.0/afs/osi_vfs.h
--- 028/libafs-O1.0/afs/osi_vfs.h       Wed Nov  1 13:38:33 2000
+++ 029/libafs-O1.0/afs/osi_vfs.h       Wed Dec 13 14:43:23 2000
@@ -28,7 +28,11 @@
        uid_t                   i_uid;
        gid_t                   i_gid;
        kdev_t                  i_rdev;
+#ifdef _REISER_FS_I /* Gack. how should I identify LFS patch? */
+       loff_t                  i_size;
+#else
        off_t                   i_size;
+#endif
        time_t                  i_atime;
        time_t                  i_mtime;
        time_t                  i_ctime;
diff -ru 028/libafs-O1.0/afs/osi_vnodeops.c 029/libafs-O1.0/afs/osi_vnodeops.c
--- 028/libafs-O1.0/afs/osi_vnodeops.c  Wed Nov  1 13:38:33 2000
+++ 029/libafs-O1.0/afs/osi_vnodeops.c  Wed Dec 13 14:38:47 2000
@@ -24,6 +24,12 @@
 #include "../h/mm.h"
 #include "../h/pagemap.h"
 
+#ifdef pgoff2ulong
+#define pageoff(pp) pgoff2ulong((pp)->index)
+#else
+#define pageoff(pp) pp->offset
+#endif
+
 extern struct vcache *afs_globalVp;
 
 extern struct dentry_operations *afs_dops;
@@ -970,7 +976,7 @@
     set_bit(PG_locked, &pp->flags); /* other bits? See mm.h */
     clear_bit(PG_error, &pp->flags);
 
-    setup_uio(&tuio, &iovec, (char*)address, pp->offset, PAGESIZE,
+    setup_uio(&tuio, &iovec, (char*)address, pageoff(pp), PAGESIZE,
              UIO_READ, AFS_UIOSYS);
     code = afs_rdwr((struct vcache*)ip, &tuio, UIO_READ, 0, credp);
 
@@ -1061,7 +1067,7 @@
               ICL_TYPE_POINTER, pp,
               ICL_TYPE_INT32, atomic_read(&pp->count),
               ICL_TYPE_INT32, 99999);
-    setup_uio(&tuio, &iovec, page_addr + offset, pp->offset + offset, count,
+    setup_uio(&tuio, &iovec, page_addr + offset, pageoff(pp) + offset, count,
              UIO_WRITE, AFS_UIOSYS);
 
     code = afs_write(vcp, &tuio, fp->f_flags, credp, 0);

Reply via email to