Subject: Re: The demise of DEV_BSIZE
To: Chuck Silvers <chuq@chuq.com>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: tech-kern
Date: 10/11/1999 16:45:57
On Tue, 5 Oct 1999, Chuck Silvers wrote:
> On Tue, Oct 05, 1999 at 05:20:09PM -0700, Bill Studenmund wrote:
> > On Tue, 5 Oct 1999, Chuck Silvers wrote:
> >
> > > 2. do we really need a (*d_bsize)() ? I recall that there was already a
> > > device ioctl that returns this info... or maybe I was just thinking
> > > that that's how I'd do it eventually.
> >
> > I don't remember seeing such an ioctl.
>
> yea, I was probably just wishing there were such an ioctl.
[snip]
> slightly more setup goo in exactly two places, at the cost of adding
> another devops interface that doesn't apply to all devices when there's
> an existing interface that will work perfectly well.
Actually I've looked into it, and something in devops is the best way to
go. The problem with using an ioctl is that at present you can't use an
ioctl on a device until after you've opened it, while whatever we do is
being done in checkalias, which is called for unopened (and unopenable)
vnodes.
So if we use the ioctl interface, ALL ioctl calls must gain the "is this
device valid" tests. By using a devop entry point (which non-disk devices
mark as being absent), only things which are really disks bother adding
these tests. So adding the entry point saves us code bloat (all the
non-disk ioctl routines which don't need to change). :-)
While we don't have to do this test in checkalias, it's the call which
fills in the struct specinfo structure, so it seems the best place to set
this up.
Take care,
Bill