Cleanup a couple of serious issues with vinum.
authorMatthew Dillon <dillon@dragonflybsd.org>
Fri, 16 Sep 2005 04:33:14 +0000 (04:33 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Fri, 16 Sep 2005 04:33:14 +0000 (04:33 +0000)
commit83d36d43664342d09f00543be9aaf79e97ac9339
tree58abb20abbb1d6f0695422d7b7d6b73042e437b4
parent8ddd38354168b8632bf3ff86232260f61e1f0976
Cleanup a couple of serious issues with vinum.

* If someone specifies a partition or a slice instead of a raw drive, such as
  'vinum read /dev/da0d' or 'vinum read /dev/da0s1', vinum gets really confused
  when it constructs device names while doing the drive scan.  For example,
  it was constructing device names like '/dev/da0as1d'.  Fixed.

  Note that vinum cannot recover the complete configuration when vinum read
  is used to scan a single partition such as /dev/da0d.  You have to tell
  it to scan the all drives associated with the vinum volume for it to be
  able to complete configure the volume.  If a 'vinum list' shows drives
  as 'referenced' without a device path, the related volumes/plexes/whatever
  cannot be used until the remaining subdisks are loaded.

* vinum was attempting to construct the device major/minor number manually
  instead of using the appropriate macros, which prevented it from properly
  handling partitions greater then 'i' through 'p'.  Fixed.

* vinum was issuing BUF_STRATEGY calls without initializing b_dev.  In
  DragonFly, b_dev must be initialized prior to every strategy call, even
  when reusing a buffer (this requirement will later be used as part of
  the block number translation caching subsystem).

Reported-by: Dave Hayes
sys/dev/raid/vinum/vinumconfig.c
sys/dev/raid/vinum/vinuminterrupt.c
sys/dev/raid/vinum/vinumio.c