Subject: Re: The demise of DEV_BSIZE
To: Bill Studenmund <wrstuden@nas.nasa.gov>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: tech-kern
Date: 10/11/1999 16:57:12
On Mon, 11 Oct 1999 16:45:57 -0700 (PDT) 
 Bill Studenmund <wrstuden@nas.nasa.gov> 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]

There *IS* an ioctl for it already!

DIOCGDEFLABEL returns the "default label" for a device.  This, on disks
that are capable (i.e. all SCSI and IDE disks) returns the *hardware*
parameters for the disk, including the sector size, number of sectors,
and the "geometry".

It does not read the disklabel from the disklabel area.

In short, there's already an interface for this, and there is no need
to add an additional interface to return what is essentially redundant
information.

        -- Jason R. Thorpe <thorpej@nas.nasa.gov>