[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Qemu-devel] [PATCH 19/35] block/raw-posix: avoid bogus fixup for cylind
From: |
Michael Roth |
Subject: |
[Qemu-devel] [PATCH 19/35] block/raw-posix: avoid bogus fixup for cylinders on DASD disks |
Date: |
Mon, 21 Mar 2016 12:28:17 -0500 |
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>
(cherry picked from commit 972b543c6b63579aee590b738d21af09f01569f7)
Signed-off-by: Michael Roth <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 d9162fd..2fff184 100644
--- a/block/raw-posix.c
+++ b/block/raw-posix.c
@@ -783,7 +783,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) {
@@ -803,12 +802,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.9.1
- [Qemu-devel] [PATCH 00/35] Patch Round-up for stable 2.5.1, freeze on 2016-03-25, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 10/35] ivshmem: remove redundant assignment, fix crash with msi=off, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 12/35] block: Add blk_dev_has_tray(), Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 09/35] ivshmem: no need for opaque argument, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 11/35] net: rocker: fix an incorrect array bounds check, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 17/35] net: set endianness on all backend devices, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 13/35] blockdev: Fix 'change' for slot devices, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 14/35] net/dump: fix nfds->filename leak, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 18/35] ehci: update irq on reset, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 19/35] block/raw-posix: avoid bogus fixup for cylinders on DASD disks,
Michael Roth <=
- [Qemu-devel] [PATCH 01/35] ehci: make idt processing more robust, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 21/35] s390x/css: fix control flags during csch, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 15/35] net/filter: fix nf->netdev_id leak, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 16/35] net: ne2000: check ring buffer control registers, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 24/35] qmp: Fix reference-counting of qnull on empty output visit, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 23/35] cpus: use broadcast on qemu_pause_cond, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 20/35] s390x/ioinst: set type and len for SEI response, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 27/35] e1000: eliminate infinite loops on out-of-bounds transfer start, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 26/35] block: qemu-iotests - add test for snapshot, commit, snapshot bug, Michael Roth, 2016/03/21
- [Qemu-devel] [PATCH 25/35] block: set device_list.tqe_prev to NULL on BDS removal, Michael Roth, 2016/03/21