Stefan Hajnoczi 745a9bb9cd dataplane: fix virtio_blk_data_plane_create() op blocker error path
Commit 3718d8ab65f68de2acccbe6a315907805f54e3cc ("block: Replace in_use
with operation blocker") broke the error path because it consumed
local_err instead of propagating it.

The caller has no way to know that the function failed.  This caused
virtio-blk to start "successfully" even though there was a fatal
dataplane error.

Steps to reproduce:

  $ qemu-system-x86_64 -enable-kvm -object iothread,id=iothread0 \
                       -drive if=none,id=drive0,file=a.img \
  (qemu) drive_mirror drive0 /tmp/foo.img
  (qemu) device_add virtio-blk-pci,iothread=iothread0,drive=drive0

Expected result:

  Since the mirror block job is using drive0 it is not possible to start
  virtio-blk data-plane.

  device_add fails and the PCI adapter is not added.

Actual result:

  device_add completes and the PCI adapter is added.

Cc: Fam Zheng <famz@redhat.com>
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
2014-09-11 16:21:46 +02:00
2014-08-20 21:15:56 +02:00
2014-09-04 17:39:07 +01:00
2014-08-26 13:52:15 +01:00
2014-09-02 22:38:16 +04:00
2014-08-18 14:39:10 -04:00
2014-08-24 13:16:32 +04:00
2014-08-29 10:46:58 +01:00
2014-08-29 10:46:58 +01:00
2014-08-29 10:46:58 +01:00
2014-08-29 10:46:58 +01:00
2014-09-02 22:38:16 +04:00
2014-08-18 14:39:10 -04:00
2014-08-29 10:48:45 +01:00
2014-09-02 22:38:16 +04:00
2014-08-15 18:44:48 +01:00
2014-09-02 16:07:31 +01:00
2014-09-04 16:14:47 +02:00

Read the documentation in qemu-doc.html or on http://wiki.qemu-project.org

- QEMU team
Description
QEMU With E2K User Support
Readme 459 MiB
Languages
C 83.1%
C++ 6.3%
Python 3.2%
Dylan 2.8%
Shell 1.6%
Other 2.8%