tech-kern archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

disk driver interface



Currently NetBSD has three programming interfaces to determine
disk geometry from userland.

- ioctl DIOCGDINFO. The traditional interface, limited to 32bit
  numbers or disks < 2TB because its data structure corresponds
  to the binary on-disk structure.

- the "get-properties" command to the drvctl(4) driver. drvctl(4)
  is missing on some ports and some disk drivers don't make
  geometry properties available.

- ioctl DIOCGWEDGEINFO. Works only for wedges but not for the
  disk drivers themselves. This is fine for operations on
  data blocks of a wedge but doesn't help e.g. partitioning
  tools. It also does not provide the sector size.

To solve this, we could

- create a new DIOCGDINFO version that uses larger numbers. AFAIK
  that is about what OpenBSD does. The on-disk structure could be
  translated but writing a label might be incompatible if partitions
  are defined beyond the 2TB limit.

- make drvctl(4) mandatory and make all disk drivers provide
  geometry properties.

- make DIOCGWEDGEINFO available for the disk drivers and
  ignore wedge-related information.

- import FreeBSD DIOCGMEDIASIZE (and DIOCGSECTORSIZE) ioctls.


Comments?



-- 
                                Michael van Elst
Internet: mlelstv%serpens.de@localhost
                                "A potential Snark may lurk in every tree."


Home | Main Index | Thread Index | Old Index