From owner-freebsd-hackers Sun Jan 28 18:20:30 2001 Delivered-To: freebsd-hackers@freebsd.org Received: from elixir.e.kth.se (elixir.e.kth.se [130.237.48.5]) by hub.freebsd.org (Postfix) with ESMTP id 763AC37B400 for ; Sun, 28 Jan 2001 18:20:11 -0800 (PST) Received: from mom.e.kth.se (mom.e.kth.se [130.237.48.249]) by elixir.e.kth.se (8.9.3/8.9.3) with ESMTP id DAA09222; Mon, 29 Jan 2001 03:20:00 +0100 (MET) Received: (from lha@localhost) by mom.e.kth.se (8.9.3/8.9.3) id DAA27732; Mon, 29 Jan 2001 03:20:08 +0100 (MET) X-Authentication-Warning: mom.e.kth.se: lha set sender to lha@stacken.kth.se using -f To: Chris Cc: freebsd-hackers@freebsd.org, arla-drinkers@stacken.kth.se Subject: Re: FreeBSD Linux emulation / arla 0.34.6 References: <3A6F2302.1C35E034@137.org> From: Love Date: 29 Jan 2001 03:20:08 +0100 In-Reply-To: Chris's message of "Wed, 24 Jan 2001 12:46:26 -0600" Message-ID: Lines: 46 User-Agent: Gnus/5.0804 (Gnus v5.8.4) Emacs/20.6 MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk X-Loop: FreeBSD.ORG Chris 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 #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