Skip site navigation (1)Skip section navigation (2)
Date:      29 Jan 2001 03:20:08 +0100
From:      Love <lha@stacken.kth.se>
To:        Chris <cc@137.org>
Cc:        freebsd-hackers@freebsd.org, arla-drinkers@stacken.kth.se
Subject:   Re: FreeBSD Linux emulation / arla 0.34.6
Message-ID:  <am1ytnumjr.fsf@mom.e.kth.se>
In-Reply-To: Chris's message of "Wed, 24 Jan 2001 12:46:26 -0600"
References:  <3A6F2302.1C35E034@137.org>

next in thread | previous in thread | raw e-mail | index | archive | help
Chris <cc@137.org> writes:

> I have discovered a rather interesting bug with this combination,
> and was wondering if anyone could point me in the right direction
> to help me track it down.
> 
> The problem is that linux binaries which call getdirents on an afs
> directory do not report the last directory entry:
> 
> /afs/whatever% /bin/ls -f
> 1       2       3       4
> /afs/whatever% /compat/linux/bin/ls
> 1  2  3

The patch below for arla fixes the problem.
 
> I believe that this might also be what is causing linux-netscape
> to wedge the machine (with home directories on afs), although I'm
> not positive.
> 
> Any ideas where to start the search for the offending code?

The problem is that linux_getdents uses a little too small buffer, arla
uses (before the patch) a directory-blocksize of 1024 bytes. This make
every entry that have its end past a 512 bytes offset disapper when running
under linux-emulation.

Love


Index: bsd-subr.c
===================================================================
RCS file: /afs/stacken.kth.se/src/SourceRepository/arla/arlad/bsd-subr.c,v
retrieving revision 1.55
retrieving revision 1.55.2.1
diff -u -w -u -w -r1.55 -r1.55.2.1
--- arlad/bsd-subr.c	2000/10/14 19:58:04	1.55
+++ arlad/bsd-subr.c	2001/01/29 02:02:17	1.55.2.1
@@ -44,7 +44,7 @@
 #ifdef __linux__
 #include <xfs/xfs_dirent.h>
 #else
-#define XFS_DIRENT_BLOCKSIZE 1024
+#define XFS_DIRENT_BLOCKSIZE 512
 #define xfs_dirent dirent
 #endif


To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-hackers" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?am1ytnumjr.fsf>