qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Manos Pitsidianakis <el13635@mail.ntua.gr>
To: Eric Blake <eblake@redhat.com>
Cc: qemu-devel <qemu-devel@nongnu.org>, Kevin Wolf <kwolf@redhat.com>,
	Alberto Garcia <berto@igalia.com>,
	Stefan Hajnoczi <stefanha@redhat.com>,
	qemu-block <qemu-block@nongnu.org>
Subject: Re: [Qemu-devel] [PATCH RFC] block: add block-insert-node QMP command
Date: Wed, 16 Aug 2017 12:41:35 +0300	[thread overview]
Message-ID: <20170816094135.beufpqce3v4amhl3@postretch> (raw)
In-Reply-To: <6ebebb61-1f5e-391b-03d7-cae2bee99a2f@redhat.com>

[-- Attachment #1: Type: text/plain, Size: 3379 bytes --]

On Tue, Aug 15, 2017 at 05:12:42PM -0500, Eric Blake wrote:
>On 08/15/2017 02:45 AM, Manos Pitsidianakis wrote:
>> block-insert-node and its pair command block-remove-node provide runtime
>> insertion and removal of filter nodes.
>>
>> block-insert-node takes a (parent, child) and (node, child) pair of
>> edges and unrefs the (parent, child) BdrvChild relationship and creates
>> a new (parent, node) child with the same BdrvChildRole.
>>
>> This is a different approach than x-blockdev-change which uses the driver
>> methods bdrv_add_child() and bdrv_del_child(),
>>
>> Signed-off-by: Manos Pitsidianakis <el13635@mail.ntua.gr>
>> ---
>>  block.c                    |  192 ++++++++
>>  blockdev.c                 |   44 ++
>>  include/block/block.h      |    6 +
>>  qapi/block-core.json       |   60 +++
>>  tests/qemu-iotests/193     |  241 ++++++++++
>>  tests/qemu-iotests/193.out | 1116 ++++++++++++++++++++++++++++++++++++++++++++
>>  tests/qemu-iotests/group   |    1 +
>>  7 files changed, 1660 insertions(+)
>>  create mode 100755 tests/qemu-iotests/193
>>  create mode 100644 tests/qemu-iotests/193.out
>
>You may want to look at using scripts/git.orderfile, to rearrange your
>patch so that interface changes (.json, .h) occur before implementation
>(.c).  For now, I'm just focusing on the interface:

Thanks for the tip, I will use it from now on!
>
>
>> +++ b/qapi/block-core.json
>> @@ -3947,3 +3947,63 @@
>>    'data' : { 'parent': 'str',
>>               '*child': 'str',
>>               '*node': 'str' } }
>> +
>> +##
>> +# @block-insert-node:
>> +#
>> +# Insert a filter node between a specific edge in the block driver state graph.
>> +# @parent:  the name of the parent node or device
>> +# @node:    the name of the node to insert under parent
>> +# @child:   the name of the child of both node and parent
>
>Is this always going to be between two existing nodes, or can this
>command also be used to insert at the end of the chain (for example, if
>parent or child is omitted)?

If this is used for filter nodes, I suppose only between would make 
sense (for now). Is there a use case for the latter?
>
>
>> +#    }
>> +# <- { 'return': {} }
>> +#
>> +##
>
>Missing 'Since: 2.11'.
>
>> +{ 'command': 'block-insert-node',
>> +  'data': { 'parent': 'str',
>> +             'child': 'str',
>> +             'node': 'str'} }
>
>For now, it looks like you require all arguments, and therefore this is
>always insertion in the middle.
>
>> +##
>> +# @block-remove-node:
>> +#
>> +# Remove a filter node between two other nodes in the block driver state graph.
>> +# @parent:  the name of the parent node or device
>> +# @node:    the name of the node to remove from parent
>> +# @child:   the name of the child of node which will go under parent
>> +##
>> +{ 'command': 'block-remove-node',
>> +  'data': { 'parent': 'str',
>> +             'child': 'str',
>> +             'node': 'str'} }
>
>Likewise missing 2.11.
>
>Overall I'm not seeing problems with the interface from the UI
>perspective, but I have not been paying close attention to your larger
>efforts on throttling nodes, so I hope other reviewers will chime in.
>
>-- 
>Eric Blake, Principal Software Engineer
>Red Hat, Inc.           +1-919-301-3266
>Virtualization:  qemu.org | libvirt.org
>




[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2017-08-16  9:42 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-08-15  7:45 [Qemu-devel] [PATCH RFC] block: add block-insert-node QMP command Manos Pitsidianakis
2017-08-15 22:12 ` Eric Blake
2017-08-16  9:41   ` Manos Pitsidianakis [this message]
2017-08-16 11:59     ` Eric Blake
2017-08-16 12:11       ` Manos Pitsidianakis
2017-08-16 12:18         ` Eric Blake
2017-09-29 17:52 ` Kevin Wolf
2017-10-04 12:23   ` Manos Pitsidianakis
2017-10-04 12:53     ` Kevin Wolf
2017-10-04 12:49 ` [Qemu-devel] [Qemu-block] " Max Reitz
2017-10-04 17:05   ` Manos Pitsidianakis
2017-10-04 18:09     ` Max Reitz
2017-10-04 21:04       ` Manos Pitsidianakis
2017-10-06 12:59         ` Max Reitz
2017-10-06 13:45           ` Manos Pitsidianakis

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=20170816094135.beufpqce3v4amhl3@postretch \
    --to=el13635@mail.ntua.gr \
    --cc=berto@igalia.com \
    --cc=eblake@redhat.com \
    --cc=kwolf@redhat.com \
    --cc=qemu-block@nongnu.org \
    --cc=qemu-devel@nongnu.org \
    --cc=stefanha@redhat.com \
    /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).