[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PULL 02/17] block/raw-posix: avoid bogus fixup for cylinde
From: |
Kevin Wolf |
Subject: |
[Qemu-devel] [PULL 02/17] block/raw-posix: avoid bogus fixup for cylinders on DASD disks |
Date: |
Wed, 20 Jan 2016 17:24:51 +0100 |
From: Christian Borntraeger <address@hidden>
large volume DASD that have > 64k cylinders do claim to have
0xFFFE cylinders as special value in the old 16 bit field. We
want to pass this "token" along to the guest, instead of
calculating the real number. Otherwise qemu might fail with
"cyls must be between 1 and 65535"
Cc: address@hidden
Acked-by: Cornelia Huck <address@hidden>
Signed-off-by: Christian Borntraeger <address@hidden>
Reviewed-by: Markus Armbruster <address@hidden>
Signed-off-by: Kevin Wolf <address@hidden>
---
block/raw-posix.c | 7 -------
1 file changed, 7 deletions(-)
diff --git a/block/raw-posix.c b/block/raw-posix.c
index 076d070..816bdf7 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -779,7 +779,6 @@ static int hdev_probe_geometry(BlockDriverState *bs,
HDGeometry *geo)
{
BDRVRawState *s = bs->opaque;
struct hd_geometry ioctl_geo = {0};
- uint32_t blksize;
/* If DASD, get its geometry */
if (check_for_dasd(s->fd) < 0) {
@@ -799,12 +798,6 @@ static int hdev_probe_geometry(BlockDriverState *bs,
HDGeometry *geo)
}
geo->heads = ioctl_geo.heads;
geo->sectors = ioctl_geo.sectors;
- if (!probe_physical_blocksize(s->fd, &blksize)) {
- /* overwrite cyls: HDIO_GETGEO result is incorrect for big drives */
- geo->cylinders = bdrv_nb_sectors(bs) / (blksize / BDRV_SECTOR_SIZE)
- / (geo->heads * geo->sectors);
- return 0;
- }
geo->cylinders = ioctl_geo.cylinders;
return 0;
--
1.8.3.1
- [Qemu-devel] [PULL 00/17] Block patches, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 03/17] qemu-img: Speed up comparing empty/zero images, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 02/17] block/raw-posix: avoid bogus fixup for cylinders on DASD disks,
Kevin Wolf <=
- [Qemu-devel] [PULL 01/17] block: Fix .bdrv_open flags, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 07/17] qcow2: Write full header on image creation, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 08/17] block: Assert no write requests under BDRV_O_INCOMING, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 04/17] qemu-iotests: Reduce racy output in 028, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 09/17] block: Fix error path in bdrv_invalidate_cache(), Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 06/17] qcow2: Write feature table only for v3 images, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 10/17] block: Rename BDRV_O_INCOMING to BDRV_O_INACTIVE, Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 13/17] qcow2: Fix BDRV_O_INACTIVE handling in qcow2_invalidate_cache(), Kevin Wolf, 2016/01/20
- [Qemu-devel] [PULL 12/17] qcow2: Implement .bdrv_inactivate, Kevin Wolf, 2016/01/20