tech-kern archive

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

Re: getting wedge information (esp. size) in kenrel ?



On Sun, 2008-02-24 at 19:34 +0100, Manuel Bouyer wrote:
> Hi,
> right now, the Xen block device backend gets the size information
> of the backing device with
> VOP_IOCTL(xbdi->xbdi_vp, DIOCGPART, &dpart, FREAD, 0);
> but with this the size information is trucated to 32bits. If xbdi_vp points
> to a wedge device, is there a way to get its 64bit size (and how do I
> know it's a wedge in the first place) ?

Hi Maneul,

I had opened a bug (kern/37370) regarding a xen dom0 directly using
wedges for the domU's disk devices. You can probably close the bug once
you decide what to do.

See the function rf_getdisksize() in sys/dev/raidframe/rf_netbsdkintf.c
which is what I based my patch off of. Essentially, you need to call
VOP_IOCTL(..., DIOCGWEDGEINFO, ...) if the DIOCGPART failed.

Ron



Home | Main Index | Thread Index | Old Index