qemu-block
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-block] [Qemu-devel] [PATCH RFC] block: add block-insert-node Q


From: Manos Pitsidianakis
Subject: Re: [Qemu-block] [Qemu-devel] [PATCH RFC] block: add block-insert-node QMP command
Date: Wed, 16 Aug 2017 15:11:38 +0300
User-agent: NeoMutt/20170609-57-1e93be (1.8.3)

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: signature.asc
Description: PGP signature


reply via email to

[Prev in Thread] Current Thread [Next in Thread]