virtio_blk: provide getgeo
authorChristian Borntraeger <borntraeger@de.ibm.com>
Wed, 23 Jan 2008 16:56:50 +0000 (17:56 +0100)
committerRusty Russell <rusty@rustcorp.com.au>
Mon, 4 Feb 2008 12:50:09 +0000 (23:50 +1100)
commit135da0b037984c0284acdf40aaf4f7f31eb5cbd0
tree733f368d62f5e1367550380d50c2e6d98e498660
parent6c0cd7c000dc0851035c5003bf9d47733d0b257b
virtio_blk: provide getgeo

Rusty,

I currently try to make my guest boot from an virtio root device
without having an external kernel. Some of the tools that I tried
expect HDIO_GETGEO to work. The most interesting value is likely
the geo.start value to get the offset of a partition. This value
is filled by block/ioctl.c if fops->getgeo is set. This patch also
fills in some standard values for heads, sectors and cylinders.

Makes sense?

Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com>
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
drivers/block/virtio_blk.c