Arla 0.26/27pre4 vs. Linux 2.2.10 on SparcUltra 5

Love lha at stacken.kth.se
Fri Aug 27 14:29:53 CEST 1999


Tobias Grundmann <grundman at Informatik.Uni-Tuebingen.De> writes:

> after digging around a bit in the arla sources I think one of the
> problems with this 32/64 bit issue is CACHEHANDLESIZE in xfs_message.h
> which is to small. xfs_message.h is included in both the kernel module
> and arlad stuff. Compiling one with 64 bit and the other one with 32
> bit while this file_handle thing in xfs/linux/xfs_syscalls.c has a
> plain unsigned int in it... then a memcpy in xfs_fh_to_dentry... 

I think its isn't that. I think the map/assar found out its was structures
was unaligned.

> Well I wonder if its worth to investigate this further and do
> eventually some real work on it. Will there be an update soon? 

Try the following patch agaist 0.27 that will be out the door in any time
soon. (hopfully today) The patch will not be i 0.27 since its untested.

Love


Index: xfs_message.h
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/xfs/include/xfs/xfs_message.h,v
retrieving revision 1.30
retrieving revision 1.32
diff -u -w -u -w -r1.30 -r1.32
--- xfs_message.h	1999/07/24 13:36:10	1.30
+++ xfs_message.h	1999/08/16 02:01:04	1.32
@@ -60,12 +60,12 @@
  * The xfs_cred, if pag == 0, use uid 
  */
 typedef struct xfs_cred {
-    __kernel_uid_t uid;
+    u_int32_t uid;
     pag_t pag;
 } xfs_cred;
 
-typedef unsigned long xfs_locktype_t;
-typedef unsigned long xfs_lockid_t;
+typedef u_int32_t xfs_locktype_t;
+typedef u_int32_t xfs_lockid_t;
 
 
 #define MAXHANDLE (4*4)
@@ -74,7 +74,7 @@
 #define XFS_ANONYMOUSID 32766
 
 typedef struct xfs_handle {
-    u_int a, b, c, d;
+    u_int32_t a, b, c, d;
 } xfs_handle;
 
 #define xfs_handle_eq(p, q) \
@@ -133,20 +133,24 @@
 
 struct xfs_msg_node {
     xfs_handle handle;
-    u_int tokens;
+    u_int32_t tokens;
+    u_int32_t pad1;
     struct xfs_attr attr;
     pag_t id[MAXRIGHTS];
     u_char rights[MAXRIGHTS];
     u_char anonrights;
+    u_int16_t pad2;
+    u_int32_t pad3;
 };
 
 /*
  * Messages passed through the  xfs_dev.
  */
 struct xfs_message_header {
-  u_int size;
-  u_int opcode;
-  u_int sequence_num;		/* Private */
+  u_int32_t size;
+  u_int32_t opcode;
+  u_int32_t sequence_num;		/* Private */
+  u_int32_t pad1;
 };
 
 /*
@@ -217,7 +221,7 @@
 /* XFS_MESSAGE_VERSION */
 struct xfs_message_version {
   struct xfs_message_header header;
-  int probe;			/* What to probe */
+  u_int32_t probe;			/* What to probe */
 #define XFS_VERSION_YES		0x1000
 #define XFS_VERSION_NO		0x1001
 
@@ -226,14 +230,14 @@
 #define XFS_VERSION_FHGET	(XFS_VERSION_BASE+2)
 #define XFS_VERSION_FHGET_NATIVE (XFS_VERSION_BASE+3)
 #define XFS_VERSION_GC_NODES 	(XFS_VERSION_BASE+4)
-    int ret;
+    u_int32_t ret;
 };
 
 /* XFS_MESSAGE_WAKEUP */
 struct xfs_message_wakeup {
   struct xfs_message_header header;
-  int sleepers_sequence_num;	/* Where to send wakeup */
-  int error;			/* Return value */
+  u_int32_t sleepers_sequence_num;	/* Where to send wakeup */
+  u_int32_t error;			/* Return value */
 };
 
 /* XFS_MESSAGE_GETROOT */
@@ -282,7 +286,8 @@
   struct xfs_message_header header;
   struct xfs_cred cred;
   xfs_handle handle;
-  u_int tokens;
+  u_int32_t tokens;
+  u_int32_t pad1;
 };
 
 /* XFS_MESSAGE_INSTALLDATA */
@@ -291,14 +296,16 @@
   struct xfs_msg_node node;
   char cache_name[256];		/* XXX */
   struct xfs_cache_handle cache_handle;
-  u_int flag;
+  u_int32_t flag;
+  u_int32_t pad1;
 };
 
 /* XFS_MSG_INACTIVENODE */
 struct xfs_message_inactivenode {
   struct xfs_message_header header;
   xfs_handle handle;
-  u_int flag;
+  u_int32_t flag;
+  u_int32_t pad1;
 };
 
 /* XFS_MSG_INVALIDNODE */
@@ -312,7 +319,8 @@
   struct xfs_message_header header;
   struct xfs_cred cred;
   xfs_handle handle;
-  u_int tokens;
+  u_int32_t tokens;
+  u_int32_t pad1;
 };
 
 /* XFS_MSG_PUTDATA */
@@ -321,7 +329,8 @@
   xfs_handle handle;
   struct xfs_attr attr;		/* XXX ??? */
   struct xfs_cred cred;
-  u_int flag;
+  u_int32_t flag;
+  u_int32_t pad1;
 };
 
 /* XFS_MSG_PUTATTR */
@@ -338,7 +347,8 @@
   xfs_handle parent_handle;
   char name[256];		/* XXX */
   struct xfs_attr attr;
-  int mode;
+  u_int32_t mode;
+  u_int32_t pad1;
   struct xfs_cred cred;
 };
 
@@ -399,10 +409,11 @@
 /* XFS_MSG_PIOCTL */
 struct xfs_message_pioctl {
   struct xfs_message_header header;
-  int opcode ;
+  u_int32_t opcode ;
+  u_int32_t pad1;
   xfs_cred cred;
-  int insize;
-  int outsize;
+  u_int32_t insize;
+  u_int32_t outsize;
   char msg[2048] ;    /* XXX */
   xfs_handle handle;
 };
@@ -411,9 +422,10 @@
 /* XFS_MESSAGE_WAKEUP_DATA */
 struct xfs_message_wakeup_data {
   struct xfs_message_header header;
-  int sleepers_sequence_num;	/* Where to send wakeup */
-  int error;			/* Return value */
-  int len;
+  u_int32_t sleepers_sequence_num;	/* Where to send wakeup */
+  u_int32_t error;			/* Return value */
+  u_int32_t len;
+  u_int32_t pad1;
   char msg[2048] ;    /* XXX */
 };
 
@@ -441,7 +453,8 @@
 struct xfs_message_gc_nodes {
   struct xfs_message_header header;
 #define XFS_GC_NODES_MAX_HANDLE 50
-  int len;
+  u_int32_t len;
+  u_int32_t pad1;
   xfs_handle handle[XFS_GC_NODES_MAX_HANDLE];
 };
 #endif /* _xmsg_h */





More information about the Arla-drinkers mailing list