]> git.ipfire.org Git - thirdparty/kernel/stable.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)
committerJiri Slaby <jslaby@suse.cz>
Wed, 19 Nov 2014 11:32:52 +0000 (12:32 +0100)
commit2c6b39c0b39d7a0e39b88612d4538d46a682491b
tree5880894e553fcc5f43686242921c44abec059ecc
parent81e8f4169909dc2b4e3a5c21411d2dc3750d693c
sunvdc: compute vdisk geometry from capacity

[ Upstream commit de5b73f08468b4fc5e2f6d1505f650262622f78b ]

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>
Signed-off-by: Jiri Slaby <jslaby@suse.cz>
drivers/block/sunvdc.c