FreeBSD Linux emulation / arla 0.34.6
Love
lha at stacken.kth.se
Mon Jan 29 03:20:16 CET 2001
Chris <cc at 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
More information about the Arla-drinkers
mailing list