Subject: Re: Addition to force open to open only regular files
To: Warner Losh <email@example.com>
From: Jason R Thorpe <firstname.lastname@example.org>
Date: 11/28/2000 17:01:32
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.
Oh nonsense. The "file handle", while orignally used for NFS, just
happens to be a nice, generic way of describing where a file is
without a pathname.
AFS users may recall an "open-by-inode-number" syscall that AFS included,
and a similar thing was hacked into being by others to make things like
news servers faster.
fhopen() made the data migration file system that Bill Studenmund worked
on at NASA possible, and certainly made rpc.lockd(8) easier to implement.
It also can speed up opens like the "open-by-inode-number" type call can
do. And it does it in a filesystem-independent way.
The reason fhopen() is restricted to super-user is because it would
bypass the permission checks on all of the intervening directories,
which could be bad if you've got somebody guessing file handles and
trying to open files with them.
FreeBSD doesn't like it? Probably jealous that they didn't implement
it first :-) (Or that it's NiH, certainly a possibility.)
-- Jason R. Thorpe <email@example.com>