two bugs and a patch

Love lha at stacken.kth.se
Sun Jan 7 01:31:10 CET 2001


Nickolai Zeldovich <kolya at mit.edu> writes:

> I seem to have also ran into some bug with arla and FreeBSD 4.2, where
> the contents of a directory don't seem to be validated, even when the
> callback from the fileserver has been broken. While it doesn't seem to
> be perfectly deterministic, at the moment I'm seeing this:
> 
>   freebsd% cd /afs/zepa.net/user/kolya
>   freebsd% ls | grep -c -w Q
>   0
>   aix% cd /afs/zepa.net/user/kolya
>   aix% touch Q ; ls | grep -c -w Q
>   1
>   freebsd% ls | grep -c -w Q ; ls Q
>   0
>   Q
>   freebsd% cd / ; ls /afs/zepa.net/user/kolya | grep -c -w Q
>   1

This bug only apply to current arla (and of course the snapshot).

Love


Index: xfs_message.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/xfs/bsd/xfs_message.c,v
retrieving revision 1.62
retrieving revision 1.63
diff -u -w -u -w -r1.62 -r1.63
--- xfs/bsd/xfs_message.c	2000/11/16 06:15:07	1.62
+++ xfs/bsd/xfs_message.c	2001/01/07 00:06:52	1.63
@@ -282,7 +282,7 @@
 #endif /* __FreeBSD__ */
 
 	/* If node is in use, mark as stale */
-	if (vp->v_usecount > 0) {
+	if (vp->v_usecount > 0 && vp->v_type != VDIR) {
 	    t->flags |= XFS_STALE;
 	    return 0;
 	}

Index: xfs_message.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/xfs/linux/xfs_message.c,v
retrieving revision 1.93
retrieving revision 1.94
diff -u -w -u -w -r1.93 -r1.94
--- xfs/linux/xfs_message.c	2000/11/16 06:31:36	1.93
+++ xfs/linux/xfs_message.c	2001/01/07 00:22:19	1.94
@@ -411,7 +411,7 @@
     XFSDEB(XDEBNODE, ("xfs_invalid_xnode: used dentries: %d\n",
 		      num_users));
     
-    if (num_users == 0) {
+    if (num_users == 0 || S_ISDIR(inode->i_mode)) {
 	xfs_force_invalid_xnode(xnode);
     } else {
 	xnode->flags |= XFS_STALE;





More information about the Arla-drinkers mailing list