summaryrefslogtreecommitdiffstats
path: root/hw/scsi/scsi-disk.c
diff options
context:
space:
mode:
authorKevin Wolf2016-06-23 15:12:35 +0200
committerKevin Wolf2016-07-13 13:32:27 +0200
commitf6166a06ffdb1cd5dd80adf2d82c35c3bda88239 (patch)
tree36aa065e263e1adcdc7a923ae55528ea3224e91b /hw/scsi/scsi-disk.c
parentblock/qdev: Allow node name for drive properties (diff)
downloadqemu-f6166a06ffdb1cd5dd80adf2d82c35c3bda88239.tar.gz
qemu-f6166a06ffdb1cd5dd80adf2d82c35c3bda88239.tar.xz
qemu-f6166a06ffdb1cd5dd80adf2d82c35c3bda88239.zip
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>
Diffstat (limited to 'hw/scsi/scsi-disk.c')
-rw-r--r--hw/scsi/scsi-disk.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/hw/scsi/scsi-disk.c b/hw/scsi/scsi-disk.c
index 36f8a85a70..8c26a4e179 100644
--- a/hw/scsi/scsi-disk.c
+++ b/hw/scsi/scsi-disk.c
@@ -2309,6 +2309,7 @@ static void scsi_realize(SCSIDevice *dev, Error **errp)
return;
}
}
+ blkconf_apply_backend_options(&dev->conf);
if (s->qdev.conf.discard_granularity == -1) {
s->qdev.conf.discard_granularity =