From: Stefan Hajnoczi <stefanha@redhat.com>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
John Snow <jsnow@redhat.com>,
qemu-block@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 8/9] blockdev: add x-blockdev-set-iothread testing command
Date: Wed, 6 Dec 2017 11:29:26 +0000 [thread overview]
Message-ID: <20171206112926.GA12584@stefanha-x1.localdomain> (raw)
In-Reply-To: <3d097c24-26d0-ded1-a750-58c5750298a8@redhat.com>
[-- Attachment #1: Type: text/plain, Size: 1213 bytes --]
On Tue, Dec 05, 2017 at 08:40:42AM -0600, Eric Blake wrote:
> On 12/05/2017 04:41 AM, Stefan Hajnoczi wrote:
> > +##
> > +# @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?
I deliberated about this and chose the empty string because it has
special meaning in other QMP commands too. But I agree that it's ugly.
StrOrNull is cleaner than using the empty string. Making it optional
feels strange to me so I'll switch to StrOrNull.
Stefan
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 455 bytes --]
next prev parent reply other threads:[~2017-12-06 11:29 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2017-12-05 10:41 [Qemu-devel] [PATCH 0/9] blockdev: fix QMP 'transaction' with IOThreads Stefan Hajnoczi
2017-12-05 10:41 ` [Qemu-devel] [PATCH 1/9] blockdev: hold AioContext for bdrv_unref() in external_snapshot_clean() Stefan Hajnoczi
2017-12-05 14:36 ` Eric Blake
2017-12-06 11:31 ` Stefan Hajnoczi
2017-12-05 10:41 ` [Qemu-devel] [PATCH 2/9] block: don't keep AioContext acquired after external_snapshot_prepare() Stefan Hajnoczi
2017-12-05 10:41 ` [Qemu-devel] [PATCH 3/9] block: don't keep AioContext acquired after drive_backup_prepare() Stefan Hajnoczi
2017-12-05 10:41 ` [Qemu-devel] [PATCH 4/9] block: don't keep AioContext acquired after blockdev_backup_prepare() Stefan Hajnoczi
2017-12-05 10:41 ` [Qemu-devel] [PATCH 5/9] block: don't keep AioContext acquired after internal_snapshot_prepare() Stefan Hajnoczi
2017-12-05 10:41 ` [Qemu-devel] [PATCH 6/9] block: drop unused BlockDirtyBitmapState->aio_context field Stefan Hajnoczi
2017-12-05 10:41 ` [Qemu-devel] [PATCH 7/9] iothread: add iothread_by_id() API Stefan Hajnoczi
2017-12-05 10:41 ` [Qemu-devel] [PATCH 8/9] blockdev: add x-blockdev-set-iothread testing command Stefan Hajnoczi
2017-12-05 14:40 ` Eric Blake
2017-12-06 11:29 ` Stefan Hajnoczi [this message]
2017-12-05 10:41 ` [Qemu-devel] [PATCH 9/9] qemu-iotests: add 202 external snapshots IOThread test Stefan Hajnoczi
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20171206112926.GA12584@stefanha-x1.localdomain \
--to=stefanha@redhat.com \
--cc=eblake@redhat.com \
--cc=jsnow@redhat.com \
--cc=kwolf@redhat.com \
--cc=qemu-block@nongnu.org \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).