Subject: Re: problem with tmpfs and linux emulation?
To: Steven M. Bellovin <>
From: Thor Lancelot Simon <>
List: current-users
Date: 11/09/2005 10:48:41
On Wed, Nov 09, 2005 at 10:40:21AM -0500, Steven M. Bellovin wrote:
> What, precisely, is the problem?  What is there about tmpfs that a 
> application can detect?

Linux's libc relies on knowledge of the internal structure of directory
entries rather than manipulating them with the appropriate system calls.
This causes chaos for those porting filesystems to Linux (e.g. XFS, JFS),
as well as for those emulating Linux on other systems (e.g. us) or serving
directories to Linux over network filesystems (because the Linux clients
don't translate the structure of directories on read(2) either).

We don't encounter this problem with most local filesystems because the
in-core directory data structures used by UFS are "close enough".  But
we have a nasty hack to work around it for NFS (which has a performance
impact, as well as a significant code complexity impact) and we have
trouble with filesystems that can't trivially provide directory structures
that look like Linux libc wants them to.

I have always wondered what Linux does with foreign filesystems like FAT
and NTFS.  I assume that if you try to read a directory, their kernel just

 Thor Lancelot Simon	                            

"The inconsistency is startling, though admittedly, if consistency is to be
 abandoned or transcended, there is no problem."		- Noam Chomsky