qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Max Reitz <mreitz@redhat.com>
To: Alberto Garcia <berto@igalia.com>, qemu-devel@nongnu.org
Cc: qemu-block@nongnu.org, Kevin Wolf <kwolf@redhat.com>,
	Eric Blake <eblake@redhat.com>,
	Stefan Hajnoczi <stefanha@redhat.com>
Subject: Re: [Qemu-devel] [RFC] Intermediate block mirroring
Date: Wed, 25 Apr 2018 16:03:22 +0200	[thread overview]
Message-ID: <b3ec832d-202b-db93-a163-3d63a4d36326@redhat.com> (raw)
In-Reply-To: <w51wowvqu65.fsf@maestria.local.igalia.com>

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

On 2018-04-25 15:42, Alberto Garcia wrote:
> On Wed 25 Apr 2018 03:06:34 PM CEST, Max Reitz wrote:
>>>>>>>>> One other way is to have a more generic replace-node command
>>>>>>>>> which would call bdrv_replace_node(), but I don't know if we
>>>>>>>>> want to expose that and I don't have any other use case for it
>>>>>>>>> at the moment.
>>>>>>>>
>>>>>>>> I think we do want to expose that.  As far as I'm informed, for
>>>>>>>> graph manipulation we want a command that can replace nodes
>>>>>>>> (including replacing nothing by a new node or replacing an
>>>>>>>> existing node by nothing, if the parent supports that).
>>>>>>>
>>>>>>> Was there any discussion about this in the mailing list?
>>>>>>> (proposed name for this function, features, etc.)
>>>>>>
>>>>>> Well, there is x-blockdev-change.  But we probably want to expose
>>>>>> bdrv_reopen() in the long run.
>>>>>
>>>>> Exposing bdrv_reopen() itself shouldn't be too much work (it takes
>>>>> just two node names, or am I missing something?).
>>>
>>> I just realized that I meant "Exposing bdrv_replace_node()" here.
>>>
>>>> So from my perspective...  If you think it's easy, why don't you try
>>>> it and then we'll see? *cough*
>>>
>>> I'm doing it :-)
>>>
>>>>> There's still the question of how to update the backing file string
>>>>> (on the overlay). stream and commit do it automatically, but if we do
>>>>> bdrv_reopen() or the aforementioned modification to blockdev-mirror
>>>
>>> bdrv_replace_node() again
>>
>> But the question stands whether we need simple node replacement when
>> we want bdrv_reopen() anyway.  In addition, we don't need just
>> replacement, we also need addition and removal (e.g. for backing files
>> or quorum children) -- and especially in the case of quorum, that is
>> going to be a pain (mostly naming the children).
>>
>> With bdrv_reopen(), we can just require the user to respecify all
>> children, so we don't run into the issue of how to name things at
>> least.
> 
> So in this example, if you want to replace [B] with [E] you would reopen
> [C] specifying the new backing file?
> 
>    [A] <- [B] <- [C] <- [D]
> 
>           [E]

You can just use child node name references like in blockdev-add.

Max


[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

  reply	other threads:[~2018-04-25 14:03 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-04-12 17:07 [Qemu-devel] [RFC] Intermediate block mirroring Alberto Garcia
2018-04-13 14:23 ` Max Reitz
2018-04-16 14:59   ` Alberto Garcia
2018-04-16 15:15     ` Max Reitz
2018-04-18 15:34       ` Alberto Garcia
2018-04-20 13:13         ` Max Reitz
2018-04-25 12:58           ` Alberto Garcia
2018-04-25 13:06             ` Max Reitz
2018-04-25 13:42               ` Alberto Garcia
2018-04-25 14:03                 ` Max Reitz [this message]
2018-05-02 13:07                   ` Alberto Garcia
2018-05-02 14:12                     ` Max Reitz
2018-05-03 10:32                       ` Alberto Garcia
2018-05-03 12:22                       ` Kevin Wolf
2018-05-03 12:33                         ` Alberto Garcia
2018-05-09 14:22                         ` Alberto Garcia
2018-06-01 10:51                         ` Alberto Garcia
2018-06-11 12:20                           ` Kevin Wolf
2018-06-11 12:23                             ` Alberto Garcia
  -- strict thread matches above, loose matches on Subject: below --
2015-04-02 13:28 Alberto Garcia
2015-04-02 16:56 ` Eric Blake

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=b3ec832d-202b-db93-a163-3d63a4d36326@redhat.com \
    --to=mreitz@redhat.com \
    --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).