]> git.baikalelectronics.ru Git - kernel.git/commit
sunvdc: compute vdisk geometry from capacity
authorAllen Pais <allen.pais@oracle.com>
Fri, 19 Sep 2014 13:42:26 +0000 (09:42 -0400)
committerDavid S. Miller <davem@davemloft.net>
Tue, 30 Sep 2014 21:37:35 +0000 (14:37 -0700)
commit64bf5784d08bad8680a1bf4de74dc8f231ee90c9
tree816a637bb63a32c37b87b1624b25aa76c4d18d91
parentfd65a17bbca4e5a66c6474f8bd48ac0fc7c37739
sunvdc: compute vdisk geometry from capacity

The LDom diskserver doesn't return reliable geometry data. In addition,
the types for all fields in the vio_disk_geom are u16, which were being
truncated in the cast into the u8's of the Linux struct hd_geometry.

Modify vdc_getgeo() to compute the geometry from the disk's capacity in a
manner consistent with xen-blkfront::blkif_getgeo().

Signed-off-by: Dwight Engen <dwight.engen@oracle.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/block/sunvdc.c