diff options
author | Stefan Hajnoczi <stefanha@redhat.com> | 2014-09-11 13:49:39 +0100 |
---|---|---|
committer | Kevin Wolf <kwolf@redhat.com> | 2014-09-11 16:21:46 +0200 |
commit | 745a9bb9cdcdcc50219d14704477c5cd678c4a7e (patch) | |
tree | 583f94f6daa7e7ecc107f5b4b63b4fd14702e4b3 /qapi | |
parent | 466c80f21fa2a69eb5cff8048b824c4812179b8c (diff) |
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>
Diffstat (limited to 'qapi')
0 files changed, 0 insertions, 0 deletions