FreeBSD Linux emulation / arla 0.34.6
Chris Csanady
ccsanady at iastate.edu
Wed Jan 31 02:22:35 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.
This patch does fix the directory problem, but apparently not the
netscape wedging problem. Anyways, I have tracked it down I think,
but I'm notstart = dp, ncookies = 0;
dp < dp_end;
! dp = (const struct dirent *)((const char *) dp + dp->d_reclen)) {
ncookies++;
+ if (dp->d_reclen == 0)
+ break;
+ }
MALLOC(cookies, xfs_cookie_t *, ncookies * sizeof(xfs_cookie_t),
M_TEMP, M_WAITOK);
for (dp = dp_start, cookiep = cookies;
dp < dp_end;
dp = (const struct dirent *)((const char *) dp + dp->d_reclen)) {
+ if (dp->d_reclen == 0)
+ break;
off += dp->d_reclen;
*cookiep++ = off;
}
More information about the Arla-drinkers
mailing list