block/qdev: Allow configuring WCE with qdev properties
commitf6166a06ffdb1cd5dd80adf2d82c35c3bda88239
authorKevin Wolf <kwolf@redhat.com>
Thu, 23 Jun 2016 13:12:35 +0000 (23 15:12 +0200)
committerKevin Wolf <kwolf@redhat.com>
Wed, 13 Jul 2016 11:32:27 +0000 (13 13:32 +0200)
tree36aa065e263e1adcdc7a923ae55528ea3224e91b
parent8daea510951dd309a44cea8de415c685c43851cf
block/qdev: Allow configuring WCE with qdev properties

As cache.writeback is a BlockBackend property and as such more related
to the guest device than the BlockDriverState, we already removed it
from the blockdev-add interface. This patch adds the new way to set it,
as a qdev property of the corresponding guest device.

For example: -drive if=none,file=test.img,node-name=img
             -device ide-hd,drive=img,write-cache=off

Signed-off-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Max Reitz <mreitz@redhat.com>
hw/block/block.c
hw/block/nvme.c
hw/block/virtio-blk.c
hw/ide/qdev.c
hw/scsi/scsi-disk.c
hw/usb/dev-storage.c
include/hw/block/block.h