]> git.proxmox.com Git - mirror_qemu.git/commit - blockdev.c
blockdev: add x-blockdev-set-iothread testing command
authorStefan Hajnoczi <stefanha@redhat.com>
Wed, 6 Dec 2017 14:45:49 +0000 (14:45 +0000)
committerStefan Hajnoczi <stefanha@redhat.com>
Tue, 19 Dec 2017 10:25:09 +0000 (10:25 +0000)
commitca00bbb153d03c5338d8c8136812163f463f841e
treef19554fdfcb729ab19676835cafea1bb0069ccd5
parentfbcc6923b00c2b468a7470fec7863f0403a65736
blockdev: add x-blockdev-set-iothread testing command

Currently there is no easy way for iotests to ensure that a BDS is bound
to a particular IOThread.  Normally the virtio-blk device calls
blk_set_aio_context() when dataplane is enabled during guest driver
initialization.  This never happens in iotests since -machine
accel=qtest means there is no guest activity (including device driver
initialization).

This patch adds a QMP command to explicitly assign IOThreads in test
cases.  See qapi/block-core.json for a description of the command.

Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
Reviewed-by: Kevin Wolf <kwolf@redhat.com>
Reviewed-by: Eric Blake <eblake@redhat.com>
Message-id: 20171206144550.22295-9-stefanha@redhat.com
Signed-off-by: Stefan Hajnoczi <stefanha@redhat.com>
blockdev.c
qapi/block-core.json