[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-block] [Qemu-devel] [PATCH 8/9] blockdev: add x-blockdev-set-i
From: |
Eric Blake |
Subject: |
Re: [Qemu-block] [Qemu-devel] [PATCH 8/9] blockdev: add x-blockdev-set-iothread testing command |
Date: |
Tue, 5 Dec 2017 08:40:42 -0600 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.4.0 |
On 12/05/2017 04:41 AM, Stefan Hajnoczi wrote:
> 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 <address@hidden>
> ---
> +##
> +# @x-blockdev-set-iothread:
> +#
> +# Move @node and its children into the @iothread. If @iothread is empty then
> +# move @node and its children into the main loop.
> +#
> +# The node must not be attached to a BlockBackend.
> +#
> +# @node-name: the name of the block driver node
> +#
> +# @iothread: the name of the IOThread object
> +#
> +# 2. Move a node into the main loop
> +# -> { "execute": "x-blockdev-set-iothread",
> +# "arguments": { "node-name": "disk1",
> +# "iothread": "" } }
Eww. Special casing of the empty string. Would it be better design to
have iothread be optional, and to omit it to move a node into the main
loop? Or use the StrOrNull type to allow JSON null instead of "" to
mean the main loop?
--
Eric Blake, Principal Software Engineer
Red Hat, Inc. +1-919-301-3266
Virtualization: qemu.org | libvirt.org
signature.asc
Description: OpenPGP digital signature
- [Qemu-block] [PATCH 1/9] blockdev: hold AioContext for bdrv_unref() in external_snapshot_clean(), (continued)
- [Qemu-block] [PATCH 1/9] blockdev: hold AioContext for bdrv_unref() in external_snapshot_clean(), Stefan Hajnoczi, 2017/12/05
- [Qemu-block] [PATCH 2/9] block: don't keep AioContext acquired after external_snapshot_prepare(), Stefan Hajnoczi, 2017/12/05
- [Qemu-block] [PATCH 3/9] block: don't keep AioContext acquired after drive_backup_prepare(), Stefan Hajnoczi, 2017/12/05
- [Qemu-block] [PATCH 4/9] block: don't keep AioContext acquired after blockdev_backup_prepare(), Stefan Hajnoczi, 2017/12/05
- [Qemu-block] [PATCH 5/9] block: don't keep AioContext acquired after internal_snapshot_prepare(), Stefan Hajnoczi, 2017/12/05
- [Qemu-block] [PATCH 6/9] block: drop unused BlockDirtyBitmapState->aio_context field, Stefan Hajnoczi, 2017/12/05
- [Qemu-block] [PATCH 7/9] iothread: add iothread_by_id() API, Stefan Hajnoczi, 2017/12/05
- [Qemu-block] [PATCH 8/9] blockdev: add x-blockdev-set-iothread testing command, Stefan Hajnoczi, 2017/12/05
- Re: [Qemu-block] [Qemu-devel] [PATCH 8/9] blockdev: add x-blockdev-set-iothread testing command,
Eric Blake <=
- [Qemu-block] [PATCH 9/9] qemu-iotests: add 202 external snapshots IOThread test, Stefan Hajnoczi, 2017/12/05