Expand the diskslice->ds_openmask from 8 bits to 256 bits to cover all
authorMatthew Dillon <dillon@dragonflybsd.org>
Wed, 13 Jun 2007 20:58:38 +0000 (20:58 +0000)
committerMatthew Dillon <dillon@dragonflybsd.org>
Wed, 13 Jun 2007 20:58:38 +0000 (20:58 +0000)
commit41cf35027836a1069b13a99d472d8d35c1e13781
tree384e4c2869ea69353f564d94b7f8cbb24f7fbcce
parentfca0fce62c7fd37e9f9fa4e34a32917bb5114741
Expand the diskslice->ds_openmask from 8 bits to 256 bits to cover all
possible partitions.  Partitions from 'i' on, and the whole-disk partition,
were not being properly tracked, resulting in multiple device opens and
device closes to the underlying device.

In particular, this caused USB memory sticks to connect to the CAM driver
with ever-increasing DA#n unit numbers because CAMs reference counting got
seriously corrupted.

Reported-by: "Simon 'corecode' Schubert" <corecode@fs.ei.tum.de>
sys/kern/subr_disk.c
sys/kern/subr_diskslice.c
sys/sys/disklabel.h
sys/sys/disklabel32.h
sys/sys/diskslice.h