Arla 0.25 on Linux 2.2.10 bug
Martin Dickopp
martin at pktw16.phy.tu-dresden.de
Tue Jun 29 02:08:17 CEST 1999
Hi,
I am running Arla 0.25 on a Linux 2.2.10 Pentium II machine.
It works great, except for some strange behaviour, which I suspect
to be bug.
Sometimes two distinct files get the same inode number, so that some
programs (e.g. emacs) believe it's the same file. I don't know how
to reliably reproduce this, but when I check the inode numbers of a
large number of files (a few hundered), there are always some with
the same inode number. The patch below makes Arla use the same inode
numbers as Transarc AFS.
Another problem is that after creating a hard link, both directory
entries of the file show a link count of 1 instead of 2. After
stopping and restarting Arla, the correct link count (2) appears.
The patch below fixes this for me, but I'm not sure if it is really
a general solution. I have found it more by trial and error than
by really understanding what is going on. ;)
A related problem is that when a directory entry of a file with
a link count >= 3 is deleted, the link count of the remaining
directory entries is not decreased. However, when I remove one
of two directory entries of a file, the remaining one shows a
correct link count of 1. Unfortunately, I don't have a patch for
this.
Best regards,
Martin
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
diff -u --recursive arla-0.25.orig/arlad/messages.c arla-0.25/arlad/messages.c
--- arla-0.25.orig/arlad/messages.c Sun May 30 13:08:17 1999
+++ arla-0.25/arlad/messages.c Mon Jun 28 20:26:10 1999
@@ -1132,10 +1132,13 @@
int ret;
struct xfs_message_installdata msg1;
struct xfs_message_installnode msg2;
+ struct xfs_message_installattr msg3;
struct xfs_message_header *h0 = NULL;
size_t h0_len = 0;
struct xfs_message_header *h1 = NULL;
size_t h1_len = 0;
+ struct xfs_message_header *h2 = NULL;
+ size_t h2_len = 0;
parent_fid = (VenusFid *)&h->parent_handle;
existing_fid = (VenusFid *)&h->from_handle;
@@ -1202,6 +1205,11 @@
msg2.header.opcode = XFS_MSG_INSTALLNODE;
h1 = (struct xfs_message_header *)&msg2;
h1_len = sizeof(msg2);
+
+ msg3.node = msg2.node;
+ msg3.header.opcode = XFS_MSG_INSTALLATTR;
+ h2 = (struct xfs_message_header *)&msg3;
+ h2_len = sizeof(msg3);
}
out:
@@ -1213,6 +1221,7 @@
h0, h0_len,
#endif
h1, h1_len,
+ h2, h2_len,
NULL, 0);
return ret;
diff -u --recursive arla-0.25.orig/xfs/linux/xfs_node.c arla-0.25/xfs/linux/xfs_node.c
--- arla-0.25.orig/xfs/linux/xfs_node.c Tue Dec 22 14:16:34 1998
+++ arla-0.25/xfs/linux/xfs_node.c Mon Jun 28 20:24:11 1999
@@ -72,7 +72,7 @@
printk(KERN_EMERG "XFS Panic: xfs_iget: super block is NULL\n");
return NULL;
}
- if ((inode = iget(sb, (ino_t)newnode)) == NULL) {
+ if ((inode = iget(sb, (ino_t)attr->xa_fileid)) == NULL) {
printk(KERN_EMERG "XFS Panic: xfs_iget: iget failed\n");
return NULL;
}
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
--
Martin Dickopp Email: dickopp at pktw06.phy.tu-dresden.de
Inst. f. Kern- und Teilchenphysik, TU Dresden, 01062 Dresden, Germany
Office ASB E22 Phone +49-351-463-3107 Fax +49-351-463-3114
More information about the Arla-drinkers
mailing list