All of lore.kernel.org
 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 15:11:38 +0300	[thread overview]
Message-ID: <20170816121138.jecvtc7ei3sgqomp@postretch> (raw)
In-Reply-To: <1d2871d5-e224-6bc7-ebc1-f791357371ce@redhat.com>

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

On Wed, Aug 16, 2017 at 06:59:25AM -0500, Eric Blake wrote:
>On 08/16/2017 04:41 AM, Manos Pitsidianakis wrote:
>
>>>> +##
>>>> +# @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?
>
>Perhaps.
>
>Given a qcow2 image backing chain:
>
>base <- active
>
>there are four BDS (2 format, 2 protocol).  Ideally, I could add
>filtering to any one of those four nodes (a filter on the base protocol
>level restricts how much guest data can be used from the backing image,
>but with no limits on the qcow2 metadata; a filter on the base format
>level restricts metadata reads as well; similarly for filters on the
>active protocol and format layers).
>
>But adding a filter on 'active' at the format level has no pre-existing
>parent (I'm adding the filter as the new top-level).  Or am I missing
>something?

The parent in this case is the storage device (disk / cdrom), whose name 
is specified as the parent. The first example in the 
qapi/block-core.json is such a case. In code I check blk_by_name(parent) 
and if that doesn't exist, I try with bdrv_find_node(parent).  Perhaps I 
should reword the documentation or did I misunderstand what you wrote?

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

  reply	other threads:[~2017-08-16 12:12 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
2017-08-16 11:59     ` Eric Blake
2017-08-16 12:11       ` Manos Pitsidianakis [this message]
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=20170816121138.jecvtc7ei3sgqomp@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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.