Subject: Re: Vnode access from devices
To: Robert Black <email@example.com>
From: Jeremy Cooper <firstname.lastname@example.org>
Date: 01/26/1998 15:19:37
On Mon, 26 Jan 1998, Robert Black wrote:
> > On Fri, 23 Jan 1998, Robert Black wrote:
> > > I have a device which needs access to a vnode pointer pointing to itself
> > > within an ioctl(). As far as I can tell the best way to get this is by
> > > searching the [ ... ]
> > It sounds awfully fishy that a driver should need to know its
> > encapsulating V-node. Are you sure that you really need to know it? Try
> > explaining why you do. There might be an easier way to get what you need.
> I want to use it as a handle for installing a pager. vm_mmap() appears to
> expect the handle to be a vnode or NULL (for MAP_ANON).
If you want to map a part of the driver's resources into the memory space
of a user program, you should be using the mmap() switch routine of the
driver, not ioctl().