Subject: Re: problem with tmpfs and linux emulation?
To: Matt Thomas <>
From: Steven M. Bellovin <>
List: current-users
Date: 11/12/2005 13:59:26
In message <>, Matt Thomas writes:
>Steven M. Bellovin wrote:
>> In message <>, Matt Thomas writes:
>>>Bill Studenmund wrote:
>>>I don't see the problem.  Instead of using sys_read, linux would have its
>>>linux_sys_read.  It would look up the fd, see if it's a DTYPE_VNODE, and if 
>>>check to see if it's a directory.  It's only a problem is you are relying on
> t
>>>he standard sys_read routine.
>> Presumably, though, the behavior of linux_sys_read would have to depend 
>> on the underlying file system type -- it does the right thing for, say, 
>> ffs and ext2fs, but not for tmpfs.
>But it only work by "accident", not intention.  This method should be used for
>all filesystems, not just tmpfs.  It's a bit more inefficient, but more correc

I agree, with one caveat: would the linux_sys_read layer have enough 
information to fix things, regardless of the semantics of the 
underlying file system?  If not, we have a lot of file systems to fix 
to pass the proper information up to the emulation layer.

		--Steven M. Bellovin,