Subject: Re: problem with tmpfs and linux emulation?
To: Steven M. Bellovin <>
From: Matt Thomas <>
List: current-users
Date: 11/12/2005 10:57:11
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 so
>>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 correct.
Matt Thomas                     email:
3am Software Foundry              www:
Cupertino, CA              disclaimer: I avow all knowledge of this message.