tech-kern archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
vnd geometry
Having enabled DIOCGDISKINFO support for vnd, I am surprised that the
numbers don't add up - the plist and the disklabel differ:
$ ./labeltest vnd0a
size of /dev/vnd0a: 12582912 bytes
sectors-per-unit: 24576
sector-size: 512 bytes
from label:
size of /dev/vnd0a: 12761600 bytes
d_secperunit: 24925
d_secsize: 512 bytes
a: 24925 (+0)
b: 0 (+0)
c: 0 (+0)
d: 24925 (+0)
The first few lines of output are the plist. For a real disk, they match:
$ ./labeltest rwd0a
size of /dev/rwd0a: 500107862016 bytes
sectors-per-unit: 976773168
sector-size: 512 bytes
from label:
size of /dev/rwd0a: 500107862016 bytes
...
One oddity while perusing the code is:
/*
* Use pseudo-geometry specified. If none was provided,
* use "standard" Adaptec fictitious geometry.
*/
if (vio->vnd_flags & VNDIOF_HASGEOM) {
memcpy(&vnd->sc_geom, &vio->vnd_geom,
sizeof(vio->vnd_geom));
How can VNDIOF_HASGEOM ever be set?
Any thoughts on how this is meant to work?
Cheers,
Patrick
Home |
Main Index |
Thread Index |
Old Index