Arla 0.25 on Linux 2.2.10 bug

Assar Westerlund assar at stacken.kth.se
Tue Jun 29 05:33:13 CEST 1999


Martin Dickopp <martin at pktw16.phy.tu-dresden.de> writes:
> 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. ;)

No, that's one way of solving it.  I would prefer solving it in xfs
instead, with this patch:

Index: xfs/linux/xfs_node.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/xfs/linux/xfs_node.c,v
retrieving revision 1.30
diff -u -w -u -w -r1.30 xfs_node.c
--- xfs_node.c	1998/12/22 13:16:34	1.30
+++ xfs_node.c	1999/06/29 03:25:35
@@ -152,6 +152,7 @@
     
     /* Init other fields */
     result->attr = node->attr;
+    xfs_attr2inode (&result->attr, result->vn);
     XFS_TOKEN_SET(result, XFS_ATTR_R, XFS_ATTR_MASK);
     memmove(result->id, node->id, sizeof(result->id));
     memmove(result->rights, node->rights, sizeof(result->rights));


> 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.

As you say, that's a little bit harder.  I'll have to think about that
some more.

> 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;
>      }
> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -

Magnus?

/assar





More information about the Arla-drinkers mailing list