SCSI divide capacity by s->cluster_size (Rik van Riel)
authoraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 28 Jan 2009 21:58:29 +0000 (21:58 +0000)
committeraliguori <aliguori@c046a42c-6fe2-441c-8c8c-71466251a162>
Wed, 28 Jan 2009 21:58:29 +0000 (21:58 +0000)
commit005ba0ca0a6aac691f5d95e50bfd11579e789c4f
tree598ac2fa71fab9c9045b7cadbf1651b9f58141f1
parent0206ef52412d91561e220be7354e21227447b0a9
SCSI divide capacity by s->cluster_size (Rik van Riel)

Paul Brook pointed out that the number of sectors reported
by the SCSI read capacity commands needs to be divided by
s->cluster_size, because bdrv_get_geometry reports the number
of 512 byte sectors, while emulated CDROMs report 2048 byte
sectors back to the guest.

This has no consequences for emulated hard disks, which use
a cluster size of 1.

aliguori: fixed typo

Signed-off-by: Rik van Riel <riel@redhat.com>
Signed-off-by: Anthony Liguori <aliguori@us.ibm.com>
git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6469 c046a42c-6fe2-441c-8c8c-71466251a162
hw/scsi-disk.c