Subject: Re: Addition to force open to open only regular files
To: Warner Losh <>
From: Bill Studenmund <>
List: tech-kern
Date: 11/28/2000 16:25:36
On Tue, 28 Nov 2000, Warner Losh wrote:

> In message <> Thor Lancelot Simon writes:
> : On Tue, Nov 28, 2000 at 04:06:27PM -0700, Warner Losh wrote:
> : > 
> : > The talk on the FreeBSD side of the world is that these calls should
> : > quietly die a quick and sudden death.  They are fore the nfs server
> : > only and there are practicle problems with their use.  The problems
> : > aren't easily solved.  I'm not sure of all the details, but I thought
> : > I'd let the NetBSD community know what some in the FreeBSD community
> : > are thinknig.
> :
> : Are we talking about the same "these calls"?  I don't know of any "nfs
> : server" that uses fhopen() and I know of no practical problems with its
> : use.  fhopen() is essentially a hack to allow user processes to bypass the
> : namei cache, and it's a huge win for some applications (think of something
> : that manages many, many individual files, accessed in patterns that seem
> : random to the namei cache; say, an old-style Usenet news server; with
> : open-by-filehandle, it can implement its _own_ namei cache and not thrash
> : the system one).


You're kidding, aren't you?

fhopen() was NOT designed as a hack to allow user processes to bypass the
namei cache! Ack!

fhopen() was designed to open up new avenues of file system research. In
NAStore, we had a userland daemon which needed to open a file to help a
file system. The file system got into a particular VOP, realized it needed
help, and asked the daemon for it.

(It went to read from a file which had been moved to tape and needed it
reloaded from tape.)

The problem is that at that point, no path information is available. All
the file system has is a vnode. Making a VFS_VPTOFH call and having the
userland daemon use fhopen() simplifies many things.

> I'm just repeating what I heard over there.  The fhopen stuff has been
> replaced in FreeBSD with a inode file system that lops off name space
> completely for news servers and similar applications.  I was given to
> believe they are for things like amd and the like and were press
> ganged later into the news applications when ufs fell over under the
> weight of USENET.

Ahhh.... That makes a lot of sense. Yes, the calls were more for amd-ish
things (NAStore or arla, and AFS can use it too), NOT for usenet things.

The thought of a news server running as root is scarry. No wonder folks
wanted that stopped! More pwoer to them! :-)

Take care,