Subject: Re: problem with tmpfs and linux emulation?
To: None <current-users@NetBSD.org>
From: Evgeniy <dushistov@mail.ru>
List: current-users
Date: 11/12/2005 23:04:29
On Sat, Nov 12, 2005 at 08:27:46PM +0100, Jaromir Dolecek wrote:
> On Sat, Nov 12, 2005 at 02:01:46PM -0500, Steven M. Bellovin wrote:
> > The symptom is that some applications -- I'm seeing it with openoffice2 
> > -- can't read tmpfs directories via linux emulation.  A posting by Thor 
> > summarizes it:
> 
> Aha - so is the problem that Linux glibs reads the directory
> entries via read(2) rather then using getdents()? Oh my god.
> I thought they fixed it long ago - it's still present in glibc
> on SuSE 9.1?????
> 

If look at code of glibc(2.3.3),
readir->__readir->__READDIR call
__GETDENTS->__getdents

__getdents has several implementaion,

but for linux it call getdents

sysdeps/unix/sysv/linux/getdents.c:

INLINE_SYSCALL (getdents, 3, fd, CHECK_N ((char *) kdp, red_nbytes), red_nbytes);

So it is very strange statement that glibc use read in implementation of
readdir.
	   


-- 
/Evgeniy