virtio-scsi: Forbid devices with different iothreads sharing a blockdev

This patch forbids attaching a disk to a SCSI device if its using a
different AioContext. Test case included.

Signed-off-by: Alberto Garcia <berto@igalia.com>
Signed-off-by: Kevin Wolf <kwolf@redhat.com>
This commit is contained in:
Alberto Garcia 2019-01-22 17:53:23 +02:00 committed by Kevin Wolf
parent 3ff35ba391
commit eb97813ff5
3 changed files with 49 additions and 0 deletions

View file

@ -31,4 +31,24 @@ QMP_VERSION
{"return": {}}
{"return": {}}
{"return": {}}
=== Attach two SCSI disks using the same block device but different iothreads ===
Testing:
QMP_VERSION
{"return": {}}
{"return": {}}
{"return": {}}
{"return": {}}
{"return": {}}
{"return": {}}
{"return": {}}
{"error": {"class": "GenericError", "desc": "Cannot attach a blockdev that is using a different iothread"}}
{"return": {}}
{"return": {}}
{"return": {}}
{"return": {}}
{"return": {}}
{"return": {}}
{"return": {}}
*** done