From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from [140.186.70.92] (port=46815 helo=eggs.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1OW7PN-0005xo-Qn for qemu-devel@nongnu.org; Tue, 06 Jul 2010 08:37:57 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.69) (envelope-from ) id 1OW7PM-000801-0v for qemu-devel@nongnu.org; Tue, 06 Jul 2010 08:37:53 -0400 Received: from oxygen.pond.sub.org ([213.239.205.148]:60885) by eggs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1OW7PL-0007zg-Qv for qemu-devel@nongnu.org; Tue, 06 Jul 2010 08:37:51 -0400 From: Markus Armbruster Date: Tue, 6 Jul 2010 14:37:41 +0200 Message-Id: <1278419869-26126-1-git-send-email-armbru@redhat.com> Subject: [Qemu-devel] [PATCH 0/8] Split ide-drive and scsi-disk qdevs, and more List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Cc: kwolf@redhat.com, kraxel@redhat.com, hch@lst.de This patch series is about purging the "type hint" from the block layer. My previous series cleaned up improper uses it. Remaining uses are info block and qdevs ide-drive, scsidisk. Remove the type hint from info block. Its value is unreliable anyway. ide-drive and scsi-disk can either act as disk or as CD drive. They use their drive's type hint to decide between disk and CD. This is unclean. Disk vs. CD needs to be in qdev, not BlockDriverState, because it belongs to the drive's guest part. Split them into separate devices for disk and CD. Keep the old ones for backward compatibility. Bonus fix: reject empty drives unless media is removable (1-3/8). This patch series is available at git://repo.or.cz/qemu/armbru.git tag block-qdev-split: this series, based on tag block-fixes-2-v2: my previous series, based on tag blockdev-base, which the current kevin/block Markus Armbruster (8): virtio-pci: Check for virtio_blk_init() failure virtio-blk: Fix virtio-blk-s390 to require drive ide scsi virtio-blk: Reject empty drives unless media is removable block QMP: Drop query-block member "type" (type= in info block) ide: Split qdev "ide-drive" into "ide-hd" and "ide-cd" scsi: Split qdev "scsi-disk" into "scsi-hd" and "scsi-cd" blockdev: Store -drive option media in DriveInfo block: Remove type hint block.c | 32 +------------ block.h | 5 -- block_int.h | 1 - blockdev.c | 5 +- blockdev.h | 1 + hw/ide/core.c | 14 ++++-- hw/ide/internal.h | 2 +- hw/ide/qdev.c | 70 +++++++++++++++++++++++------ hw/scsi-disk.c | 124 +++++++++++++++++++++++++++++++++++++++++----------- hw/virtio-blk.c | 10 ++++ hw/virtio-pci.c | 5 +- hw/xen_devconfig.c | 2 +- qemu-monitor.hx | 6 --- 13 files changed, 185 insertions(+), 92 deletions(-)